From cd3eb901618ae6a40b046be1261f9452afbe460f Mon Sep 17 00:00:00 2001 From: Frinze Erin Lapuz Date: Fri, 9 Jan 2026 22:29:15 +0800 Subject: [PATCH] Corrections for Deployment workshop --- .github/workflows/cd-pipeline.yml | 2 +- docker-compose.prod.yml | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cd-pipeline.yml b/.github/workflows/cd-pipeline.yml index b0897cf..fc6a4e1 100644 --- a/.github/workflows/cd-pipeline.yml +++ b/.github/workflows/cd-pipeline.yml @@ -42,7 +42,7 @@ jobs: cache-to: type=gha,mode=max platforms: linux/amd64,linux/arm64 build-args: | - NEXT_PUBLIC_BACKEND_URL=http://localhost:8000 + NEXT_PUBLIC_BACKEND_URL="/api" - name: Output client image name if: github.event_name != 'pull_request' run: | diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 43047cd..b1eae07 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -12,8 +12,7 @@ services: retries: 5 server: - image: ghcr.io/codersforcauses/transplant-prod-server:latest - container_name: transplant_server + image: ghcr.io/codersforcauses/django-nextjs-template-prod-server:latest restart: unless-stopped env_file: ./.env.prod ports: @@ -21,15 +20,14 @@ services: entrypoint: /entrypoint.sh volumes: - ./opt/accesslogs/:/var/log/accesslogs/ - - ./opt/static_files:/opt/static_files + - ./opt/static_files:/app/static_files environment: - DJANGO_SETTINGS_MODULE=api.settings depends_on: - db client: - image: ghcr.io/codersforcauses/transplant-prod-client:latest - container_name: transplant_client + image: ghcr.io/codersforcauses/django-nextjs-template-prod-client:latest restart: unless-stopped env_file: ./.env.prod ports: @@ -40,7 +38,6 @@ services: nginx: image: nginx:stable-alpine3.21 - container_name: transplant_nginx restart: unless-stopped ports: - 80:80 @@ -48,14 +45,13 @@ services: volumes: - ./docker/nginx/custom.conf:/etc/nginx/nginx.conf - - ./opt/static_files:/app/static_files + - ./opt/static_files:/opt/static_files/ depends_on: - server - client watchtower: image: containrrr/watchtower:latest - container_name: transplant_watchtower restart: unless-stopped volumes: - /var/run/docker.sock:/var/run/docker.sock