Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
cb89d2c3be | |||
8ac3a2a27a | |||
73fa85b9f1 | |||
5832bb6b3c | |||
18f0f78de0 | |||
8cd87a2741 | |||
2c013eee24 | |||
|
8f47e551b0 |
21
.gitea/workflows/test-self.yaml
Normal file
21
.gitea/workflows/test-self.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is fuware be STG
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [develop]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: self-hosted
|
||||
defaults:
|
||||
run:
|
||||
working-directory: /home/raysam/act-runner-host/repo
|
||||
steps:
|
||||
- run: git --version
|
||||
- run: rm -rf fuware-be
|
||||
- run: git clone ssh://git@thamluu.synology.me:222/sam/fuware-be.git fuware-be
|
||||
- name: run docker
|
||||
working-directory: /home/raysam/act-runner-host/repo/fuware-be
|
||||
run: git switch develop && docker compose up --build -d
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
@ -53,16 +53,15 @@ app = FastAPI(
|
||||
|
||||
app.add_middleware(GZipMiddleware, minimum_size=1000)
|
||||
|
||||
if not settings.PRODUCTION:
|
||||
allowed_origins = ["http://localhost:3000"]
|
||||
allowed_origins = ["http://localhost:5001", "https://stg.samliu.io.vn"]
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=allowed_origins,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=allowed_origins,
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
@app.exception_handler(HTTPException)
|
||||
async def unicorn_exception_handler(request: Request, exc: HTTPException):
|
||||
|
@ -1,20 +1,18 @@
|
||||
services:
|
||||
fuware:
|
||||
container_name: fuware
|
||||
image: fuware:dev
|
||||
container_name: fuware-be
|
||||
image: fuware-be
|
||||
build:
|
||||
context: ../
|
||||
target: production
|
||||
dockerfile: ./docker/Dockerfile
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
volumes:
|
||||
- fuware-data:/app/data/
|
||||
- /home/raysam/act-runner-host/repo/dbdetail:/app/data/
|
||||
ports:
|
||||
- 9091:9000
|
||||
- 16002:9000
|
||||
environment:
|
||||
ALLOW_SIGNUP: "false"
|
||||
LOG_LEVEL: "DEBUG"
|
||||
|
||||
# =====================================
|
||||
# Email Configuration
|
||||
# SMTP_HOST=
|
||||
@ -24,7 +22,3 @@ services:
|
||||
# SMTP_FROM_EMAIL=
|
||||
# SMTP_USER=
|
||||
# SMTP_PASSWORD=
|
||||
|
||||
volumes:
|
||||
fuware-data:
|
||||
driver: local
|
Loading…
x
Reference in New Issue
Block a user