Fakultas Ilmu Komputer UI

Commit 44158968 authored by hashlash's avatar hashlash
Browse files

[CHORES] configure media files

parent 5c0bff97
Pipeline #51961 passed with stage
in 13 minutes and 17 seconds
......@@ -9,6 +9,7 @@ services:
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- staticfiles:/var/www/html/static/
- mediafiles:/var/www/html/media/
depends_on:
- backend
......@@ -20,6 +21,7 @@ services:
volumes:
- ./:/app/backend/
- staticfiles:/app/backend/staticfiles/
- mediafiles:/app/backend/mediafiles/
env_file:
- .env
environment:
......@@ -39,3 +41,4 @@ services:
volumes:
postgres_data:
staticfiles:
mediafiles:
......@@ -5,6 +5,10 @@ server {
root /var/www/html/;
}
location /media/ {
root /var/www/html/;
}
location / {
proxy_pass http://backend:8000;
proxy_set_header Host $http_host;
......
......@@ -141,5 +141,5 @@ USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
MEDIA_URL = '/img/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'images')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'mediafiles')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment