Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kimachinskiy committed Oct 4, 2023
1 parent dba6b6f commit c3a2d9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions FrontEnd/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ server {

location /static/ {
autoindex on;
alias /home/forum/app/forum/static/;
alias /home/forum/app/public/static/;
}

location /media/ {
autoindex on;
alias /home/forum/app/forum/medis/;
alias /home/forum/app/public/media/;
}

# Django Admin
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ services:
command: gunicorn forum.wsgi:application --bind 0.0.0.0:8000
volumes:
# - ./:/Forum
- static:/forum/static
- media:/forum/media
- static:/home/forum/app/public/static
- media:/home/forum/app/public/media
# ports:
# - 8000:8000
environment:
Expand Down
12 changes: 4 additions & 8 deletions forum/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,11 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/

STATICFILES_DIRS =[
'forum/static/admin',
'forum/static/rest_framework',
]

STATIC_URL = 'forum/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'forum/static/')
MEDIA_URL = os.path.join(BASE_DIR, 'forum/media/')
MEDIA_ROOT = 'forum/media/'
STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'public/static/')
MEDIA_URL = os.path.join(BASE_DIR, 'public/media/')
MEDIA_ROOT = 'media/'

# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
Expand Down

0 comments on commit c3a2d9c

Please sign in to comment.