Skip to content

Commit

Permalink
Merge pull request #376 from Pet-projects-CodePET/fix/deploy
Browse files Browse the repository at this point in the history
fix: static files for admin django panel
  • Loading branch information
Denis-Shtanskiy authored Aug 14, 2024
2 parents e8346ab + 02df265 commit 7286469
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,5 @@ jobs:
sudo docker compose -f docker-compose-dev.yaml up -d
sudo docker compose -f docker-compose-dev.yaml exec backend python manage.py migrate
sudo docker compose -f docker-compose-dev.yaml exec backend python manage.py collectstatic --no-input
sudo docker compose -f docker-compose-dev.yaml exec backend cp -r static/. /backend_static/static/
sudo docker compose -f docker-compose-dev.yaml exec backend cp -r /app/static/. /backend_static/static/
sudo docker system prune -f
2 changes: 1 addition & 1 deletion infra/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
environment:
- TZ=Europe/Moscow
volumes:
- static_volume:/backend_static/
- static_volume:/backend_static/static
- media_value:/backend/media/
- ${BACKEND_LOGS_DIR}:/backend/data/logs
depends_on:
Expand Down
8 changes: 8 additions & 0 deletions infra/nginx/nginx_dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ server {
alias /mediafiles/;
}

location /staticf/admin/ {
alias /staticfiles/admin/;
}

location /static/rest_framework/ {
alias /staticfiles/rest_framework/;
}

location /api/v1/ {
proxy_set_header Host $http_host;
proxy_pass http://backend/api/v1/;
Expand Down

0 comments on commit 7286469

Please sign in to comment.