diff --git a/.github/workflows/podman.yml b/.github/workflows/podman.yml index 540326b85..fbb3b9df1 100644 --- a/.github/workflows/podman.yml +++ b/.github/workflows/podman.yml @@ -49,15 +49,9 @@ jobs: cp .env frontend/.env - name: Build Podman images run: podman-compose -f docker-compose-deploy.yml build - - name: Kill muscle client container - run: podman rm -f muscle_client-runner_1 || true - name: Deploy Podman images run: podman-compose -f docker-compose-deploy.yml up -d --force-recreate - name: Check Podman images run: podman-compose -f docker-compose-deploy.yml ps - name: Check logs - run: podman-compose -f docker-compose-deploy.yml logs - - name: Check if static files are present in backend/static and backend/upload - run: | - ls -l /home/github-runner/podman-volumes/server-static - ls -l /home/github-runner/podman-volumes/server-uploads \ No newline at end of file + run: podman-compose -f docker-compose-deploy.yml logs \ No newline at end of file diff --git a/backend/aml/production_settings.py b/backend/aml/production_settings.py index ce6395847..67ac658c1 100644 --- a/backend/aml/production_settings.py +++ b/backend/aml/production_settings.py @@ -6,6 +6,11 @@ # Database # https://docs.djangoproject.com/en/3.0/ref/settings/#databases +STATIC_ROOT = '/static/' +MEDIA_ROOT = '/upload/' + +# Make sure Django runs on subpath /server +FORCE_SCRIPT_NAME = '/server/' DATABASES = { 'default': { diff --git a/nginx/custom-nginx.conf b/nginx/custom-nginx.conf index af52e2d14..d143018cf 100644 --- a/nginx/custom-nginx.conf +++ b/nginx/custom-nginx.conf @@ -17,11 +17,6 @@ server { alias /nginx/upload/; } - # Serve files from /test-path/ from the /nginx/static/ directory - location /test-path/ { - alias /nginx/static/; - } - # Proxy other /server/* requests to the Django app that runs on http://localhost:8000 location /server/ { proxy_pass http://localhost:8000;