Skip to content

Commit

Permalink
Merge pull request #37 from mikeiken/dev
Browse files Browse the repository at this point in the history
Update static file settings and Nginx configuration for Django
  • Loading branch information
Kseen715 authored Oct 14, 2024
2 parents 79882ee + a5d66b8 commit 335ea70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions django/tamprog/tamprog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/

STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = 'static-dj/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static-dj')


# STATICFILES_DIRS = (
Expand Down
12 changes: 6 additions & 6 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ upstream client {
server {
listen 80;

location / {
proxy_pass http://frontend:3000/;
}

location /api/swagger/ {
proxy_pass http://django:8000/swagger/;
}
Expand All @@ -16,12 +20,8 @@ server {
proxy_pass http://django:8000/api/;
}

location /static/ {
proxy_pass http://django:8000/static/;
}

location / {
proxy_pass http://frontend:3000/;
location /static-dj/ {
proxy_pass http://django:8000/static-dj/;
}

location /redis-commander/ {
Expand Down

0 comments on commit 335ea70

Please sign in to comment.