Skip to content

Commit

Permalink
nginx static
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavCR committed Feb 24, 2024
1 parent 691aa84 commit f4b89f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions infra/docker-compose-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ services:
ports:
- "8000:8000"
volumes:
- static_volume:/backend_static
- static_volume:/backend_static/
- media_value:/backend_media/
depends_on:
- db

Expand All @@ -28,7 +29,9 @@ services:
ports:
- "80:80"
volumes:
- static_volume:/static
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- static_volume:/var/html/static/
- media_value:/var/html/media/
- /etc/letsencrypt:/etc/letsencrypt
depends_on:
- backend
Expand Down
3 changes: 3 additions & 0 deletions infra/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ server {
proxy_set_header Host $http_host;
proxy_pass http://backend:8000/admin/;
}
location /media/ {
root /var/html/;
}
location / {
alias /staticfiles/;
index index.html;
Expand Down

0 comments on commit f4b89f2

Please sign in to comment.