Fix os import and add media settings 3
This commit is contained in:
@@ -1,21 +1,11 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
# Больше не открываем порт 8080 наружу для Django,
|
|
||||||
# теперь его будет "прикрывать" Nginx
|
|
||||||
expose:
|
|
||||||
- "8000"
|
|
||||||
command: gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
|
||||||
|
|
||||||
nginx:
|
|
||||||
image: nginx:latest
|
|
||||||
volumes:
|
|
||||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
||||||
- ./staticfiles:/app/staticfiles
|
|
||||||
- ./media:/app/media
|
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:8000"
|
||||||
depends_on:
|
environment:
|
||||||
- web
|
- DEBUG=1
|
||||||
Reference in New Issue
Block a user