From d7000d8e273b86cb39f20975aa7db95ab256283c Mon Sep 17 00:00:00 2001 From: Wolkenfarmer Date: Thu, 3 Oct 2024 17:29:05 +0200 Subject: [PATCH] improve artifact upload during deployment workflow to include all files for dev and prod mode in a streamlined manner --- .github/workflows/ci-tests.yml | 1 + .github/workflows/deploy.yml | 10 ++++++---- docker-compose.dev.yml | 2 +- docker-compose.prod.yml | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 6d543213..fff218ed 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -88,6 +88,7 @@ jobs: - name: Run docker containers with deploy dev configuration run: | + cp backend/dps_training_k/deployment/nginx/nginx_deploy_dev.conf ./nginx_dev.conf docker compose -f docker-compose.dev.yml up -d - name: Run integration tests diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8d2aa5d0..a173b801 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,10 +48,12 @@ jobs: - name: Prepare deployment files run: | mkdir deployment_files - cp docker-compose.prod.yml deployment_files/docker-compose.yml - cp ./.env.prod deployment_files/ - cp ./.env.dev deployment_files/ - cp backend/dps_training_k/deployment/nginx/nginx_deploy_prod.conf deployment_files/nginx.conf + cp docker-compose.prod.yml deployment_files/docker-compose.prod.yml + cp docker-compose.dev.yml deployment_files/docker-compose.dev.yml + cp ./.env.prod deployment_files/.env.prod + cp ./.env.dev deployment_files/.env.dev + cp backend/dps_training_k/deployment/nginx/nginx_deploy_prod.conf deployment_files/nginx_prod.conf + cp backend/dps_training_k/deployment/nginx/nginx_deploy_dev.conf deployment_files/nginx_dev.conf - name: Archive deployment files uses: actions/upload-artifact@v4 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index eefdc242..b03aa911 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -84,7 +84,7 @@ services: - django volumes: - static_volume:/app/staticfiles - - ./backend/dps_training_k/deployment/nginx/nginx_deploy_dev.conf:/etc/nginx/conf.d/nginx.conf + - ./nginx_dev.conf:/etc/nginx/conf.d/nginx.conf ports: - "80:80" - "443:443" diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index dd2c7f59..d5969090 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -86,7 +86,7 @@ services: - static_volume:/app/staticfiles - /etc/letsencrypt/live/klinik-dps.de/fullchain.pem:/etc/nginx/ssl/fullchain.pem:ro - /etc/letsencrypt/live/klinik-dps.de/privkey.pem:/etc/nginx/ssl/privkey.pem:ro - - ./nginx.conf:/etc/nginx/conf.d/nginx.conf + - ./nginx_prod.conf:/etc/nginx/conf.d/nginx.conf ports: - "80:80" - "443:443"