Fix os import and add media settings 2

This commit is contained in:
ack
2026-01-21 04:16:14 +03:00
parent bc93f9576b
commit 385cebeed0

View File

@@ -3,9 +3,19 @@ services:
build: . build: .
volumes: volumes:
- .:/app - .:/app
ports: # Больше не открываем порт 8080 наружу для Django,
- "8080:8000" # теперь его будет "прикрывать" Nginx
environment: expose:
- DEBUG=1 - "8000"
# Новая команда для Gunicorn
command: gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 3 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:
- "8080:80"
depends_on:
- web