#2: serve static and media files via nginx

This commit is contained in:
Lexi / Zoe 2019-10-21 01:49:37 +02:00
parent 3c1fec3f63
commit 0fdf7029e4
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
3 changed files with 24 additions and 1 deletions

View file

@ -6,6 +6,8 @@ services:
expose:
- 8000
volumes:
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/mediafiles
- /run/mysqld/:/run/mysqld/
env_file:
- production.secrets.env
@ -14,5 +16,12 @@ services:
build: ../nginx
ports:
- 8042:80
volumes:
- static_volume:/srv/http/staticfiles
- media_volume:/srv/http/mediafiles
depends_on:
- django
volumes:
static_volume:
media_volume: