Add deploy script and update prod compose
Deploy script builds and pushes images to Gitea registry, then triggers Portainer stack redeployment via API. Includes preflight checks for branch and uncommitted changes. Also renames prod DB volume to avoid conflicts with dev and changes frontend port to 9080. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
services:
|
||||
api:
|
||||
image: gitea.nerdboden.de/julian/nuzlocke-tracker-api:latest
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile.prod
|
||||
image: gitea.nerdboden.de/thefurya/nuzlocke-tracker-api:latest
|
||||
command: >
|
||||
sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000 --app-dir src"
|
||||
environment:
|
||||
@@ -15,12 +12,9 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
frontend:
|
||||
image: gitea.nerdboden.de/julian/nuzlocke-tracker-frontend:latest
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile.prod
|
||||
image: gitea.nerdboden.de/thefurya/nuzlocke-tracker-frontend:latest
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "9080:80"
|
||||
depends_on:
|
||||
- api
|
||||
restart: unless-stopped
|
||||
@@ -32,7 +26,7 @@ services:
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=nuzlocke
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- prod_postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
@@ -41,4 +35,4 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
prod_postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user