Compare commits

..

8 Commits

Author SHA1 Message Date
cb89d2c3be fix CORS
All checks were successful
Gitea Actions Demo / check (push) Successful in 9s
2024-09-30 18:53:49 +07:00
8ac3a2a27a remove CORS
All checks were successful
Gitea Actions Demo / check (push) Successful in 10s
2024-09-30 18:43:50 +07:00
73fa85b9f1 CORS
All checks were successful
Gitea Actions Demo / check (push) Successful in 9s
2024-09-30 18:42:25 +07:00
5832bb6b3c update CORS
All checks were successful
Gitea Actions Demo / check (push) Successful in 9s
2024-09-30 18:34:57 +07:00
18f0f78de0 update CICD
All checks were successful
Gitea Actions Demo / check (push) Successful in 9s
2024-09-30 18:27:47 +07:00
8cd87a2741 update CORS
Some checks failed
Gitea Actions Demo / check (push) Failing after 2s
2024-09-30 18:25:44 +07:00
2c013eee24 update runner
All checks were successful
Gitea Actions Demo / check (push) Successful in 1m40s
2024-09-30 17:30:24 +07:00
Tham Luu
8f47e551b0 update docker 2024-09-25 12:35:52 +08:00
4 changed files with 35 additions and 21 deletions

View 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 }}."

View File

@ -53,16 +53,15 @@ app = FastAPI(
app.add_middleware(GZipMiddleware, minimum_size=1000) app.add_middleware(GZipMiddleware, minimum_size=1000)
if not settings.PRODUCTION: allowed_origins = ["http://localhost:5001", "https://stg.samliu.io.vn"]
allowed_origins = ["http://localhost:3000"]
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=allowed_origins, allow_origins=allowed_origins,
allow_credentials=True, allow_credentials=True,
allow_methods=["*"], allow_methods=["*"],
allow_headers=["*"], allow_headers=["*"],
) )
@app.exception_handler(HTTPException) @app.exception_handler(HTTPException)
async def unicorn_exception_handler(request: Request, exc: HTTPException): async def unicorn_exception_handler(request: Request, exc: HTTPException):

View File

@ -1,20 +1,18 @@
services: services:
fuware: fuware:
container_name: fuware container_name: fuware-be
image: fuware:dev image: fuware-be
build: build:
context: ../ context: .
target: production dockerfile: Dockerfile
dockerfile: ./docker/Dockerfile
restart: always restart: always
volumes: volumes:
- fuware-data:/app/data/ - /home/raysam/act-runner-host/repo/dbdetail:/app/data/
ports: ports:
- 9091:9000 - 16002:9000
environment: environment:
ALLOW_SIGNUP: "false" ALLOW_SIGNUP: "false"
LOG_LEVEL: "DEBUG" LOG_LEVEL: "DEBUG"
# ===================================== # =====================================
# Email Configuration # Email Configuration
# SMTP_HOST= # SMTP_HOST=
@ -24,7 +22,3 @@ services:
# SMTP_FROM_EMAIL= # SMTP_FROM_EMAIL=
# SMTP_USER= # SMTP_USER=
# SMTP_PASSWORD= # SMTP_PASSWORD=
volumes:
fuware-data:
driver: local