i hope it works config for nginx media files
This commit is contained in:
+1
-1
@@ -141,7 +141,7 @@ media/
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
nginx.conf
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
|
||||
@@ -167,11 +167,11 @@ USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = BASE_DIR / "staticfiles"
|
||||
MEDIA_URL = '/shop_media/'
|
||||
MEDIA_ROOT = '/app/media'
|
||||
|
||||
MEDIA_URL = '/media/'
|
||||
MEDIA_ROOT = BASE_DIR / 'media'
|
||||
STATIC_URL = '/shop_static/'
|
||||
STATIC_ROOT = '/app/static'
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, 'static'),
|
||||
|
||||
+1
-1
@@ -11,4 +11,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY . /app/
|
||||
|
||||
|
||||
CMD ["sh", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"]
|
||||
CMD ["sh", "-c", "python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic && python manage.py runserver 0.0.0.0:8000"]
|
||||
Reference in New Issue
Block a user