Skip to content

Commit

Permalink
config(nginx): Mount django static assets & uploads directly in nginx…
Browse files Browse the repository at this point in the history
… folder
  • Loading branch information
drikusroor committed Feb 13, 2024
1 parent 5f9b25b commit f3d402e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docker-compose-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ services:
- client-builder
- server
volumes:
- /home/github-runner/podman-volumes/server-static:/nginx/static
- /home/github-runner/podman-volumes/server-uploads:/nginx/upload
- /home/github-runner/podman-volumes/server-static:/usr/share/nginx/html/django_static
- /home/github-runner/podman-volumes/server-uploads:/usr/share/nginx/html/upload
- ./nginx/custom-nginx.conf:/etc/nginx/conf.d/default.conf

10 changes: 0 additions & 10 deletions nginx/custom-nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ server {
try_files $uri $uri/ /index.html;
}

# Serve static files from the Django app
location /django_static/ {
root /nginx/static/;
}

# Serve uploaded files from the Django app
location /upload/ {
root /nginx/upload/;
}

# Proxy pass to the Django app
location /server/ {
proxy_pass http://server:8000;
Expand Down

0 comments on commit f3d402e

Please sign in to comment.