diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index e14d37c..63ee5fe 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -42,7 +42,8 @@ jobs: - name: Build and start production stack run: | - docker compose -f docker-compose.prod.yml up --build -d + docker compose -p bilhej-prod -f docker-compose.prod.yml down + docker compose -p bilhej-prod -f docker-compose.prod.yml up --build -d - name: Wait for services run: sleep 20 @@ -50,7 +51,7 @@ jobs: - name: Health check — backend API run: | for i in 1 2 3 4 5; do - if docker run --rm --network bilhej_default curlimages/curl:8.5.0 \ + if docker run --rm --network bilhej-prod_default curlimages/curl:8.5.0 \ -sf http://bilhej-backend-prod:8080/api/vehicles/ZZZ999; then echo "Backend is healthy" exit 0 @@ -64,7 +65,7 @@ jobs: - name: Health check — frontend run: | for i in 1 2 3 4 5; do - if docker run --rm --network bilhej_default curlimages/curl:8.5.0 \ + if docker run --rm --network bilhej-prod_default curlimages/curl:8.5.0 \ -sf http://bilhej-frontend-prod/ | grep -qi "bilhej\|Bilhej\|BilHej"; then echo "Frontend is serving" exit 0 @@ -82,7 +83,7 @@ jobs: echo " Deployed ${{ github.event.inputs.version }} to production" echo "═══════════════════════════════════════════════════" echo "" - docker compose -f docker-compose.prod.yml ps + docker compose -p bilhej-prod -f docker-compose.prod.yml ps echo "" echo "Containers running. Update nginx config on srvr.nu" echo "to point bilhej.se to the frontend container." diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 81a89e5..3787e6d 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -39,12 +39,8 @@ services: dockerfile: docker/frontend.prod.Dockerfile context: . container_name: bilhej-frontend-prod - ports: - - "3000:80" depends_on: - backend - volumes: - - certs:/etc/nginx/certs networks: - default - web @@ -52,7 +48,6 @@ services: volumes: pgdata-prod: - certs: networks: web: