From 417c513497d0869c654bdece9b1fef27a3f17e72 Mon Sep 17 00:00:00 2001 From: thenav56 Date: Thu, 28 Sep 2023 12:11:15 +0545 Subject: [PATCH] [DEV] Add volumes for server media/static files --- backend | 2 +- docker-compose.yml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/backend b/backend index 66af6d5..eea8c11 160000 --- a/backend +++ b/backend @@ -1 +1 @@ -Subproject commit 66af6d5397b115bb7db361e8c89b4657b1432afb +Subproject commit eea8c1121e6885b580bd7219b94399804c9c82b5 diff --git a/docker-compose.yml b/docker-compose.yml index 68bc0ab..3dbaec2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,12 +30,16 @@ x-server: &base_server_setup CELERY_REDIS_URL: ${CELERY_REDIS_URL:-redis://redis:6379/1} DJANGO_CACHE_REDIS_URL: ${DJANGO_CACHE_REDIS_URL:-redis://redis:6379/2} TEST_DJANGO_CACHE_REDIS_URL: ${TEST_DJANGO_CACHE_REDIS_URL:-redis://redis:6379/12} + # FS Config + DJANGO_STATIC_ROOT: '/app-assets/static' + DJANGO_MEDIA_ROOT: '/app-assets/media' env_file: # Provide additional environment variables using .env file - .env volumes: - ./backend/:/code - - media:/media + - server-media:/app-assets/media + - server-static:/app-assets/static - ipython_data_local:/root/.ipython/profile_default # persist ipython data, including ipython history depends_on: - db @@ -125,7 +129,8 @@ services: volumes: - media: + server-media: + server-static: postgres-data15: redis-data: ipython_data_local: