dana-medical-site/docker-compose.yml
2026-10-14 13:33:13 +00:00

45 lines
1.2 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.

services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: dana
POSTGRES_USER: dana
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-dana}
ports:
- "5433:5432"
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dana -d dana"]
interval: 5s
timeout: 3s
retries: 10
api:
build: .
environment:
DATABASE_URL: postgres://dana:${POSTGRES_PASSWORD:-dana}@db:5432/dana?sslmode=disable
APP_ADDR: ":8080"
MEDIA_DIR: /data/media
DEBUG: "true"
SITE_URL: ${SITE_URL:-}
# Уведомления о заявках на почту; пустой SMTP_HOST — отключены.
# Для Яндекс Почты: smtp.yandex.ru, порт 465, пароль приложения, а не пароль ящика.
SMTP_HOST: ${SMTP_HOST:-}
SMTP_PORT: ${SMTP_PORT:-465}
SMTP_USER: ${SMTP_USER:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
NOTIFY_FROM: ${NOTIFY_FROM:-}
NOTIFY_TO: ${NOTIFY_TO:-}
ports:
- "8080:8080"
volumes:
- media:/data/media
depends_on:
db:
condition: service_healthy
volumes:
db-data:
media: