Files
ProdMan/docker-compose.yml
ackFromRedmi 41b009160e
All checks were successful
Auto-Deploy-prodman / deploy (push) Successful in 6s
Сменил порт на 8085
2026-02-14 23:52:41 +03:00

54 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: prodman
services:
db:
image: postgres:15-alpine
restart: always
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
volumes:
- postgres_data:/var/lib/postgresql/data
web:
build: .
# Загружаем переменные окружения в settings.py
env_file:
- .env
# Пока не убираем, вопрос возникает о дбхосте
# environment:
# - ENV_TYPE={ENV_TYPE}
# - DB_NAME={DB_NAME}
# - DB_USER={DB_USER}
# - DB_PASS={DB_PASS}
# - DB_HOST=db
volumes:
- staticfiles:/app/staticfiles # Сюда статику
- mediafiles:/app/media # Сюда медиа
# - .:/app
expose:
- "8000"
depends_on:
- db
nginx:
image: nginx:1.25-alpine
volumes:
# Подключаем конфиг и статику с медиа в режиме только для чтения (т.к. nginx смотрит в интернет и может быть подвергнута атаке)
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- staticfiles:/app/staticfiles:ro
- mediafiles:/app/media:ro
ports:
- "8085:80"
depends_on:
- web
volumes:
postgres_data:
staticfiles:
mediafiles: