Files
fotohost/docker-compose.yml
T
test2 79b37d1891 first commit
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 21:59:09 +03:00

38 lines
1.1 KiB
YAML

services:
db:
image: postgres:16-alpine
container_name: photohost-db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-photohost}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-photohost_secret}
POSTGRES_DB: ${POSTGRES_DB:-photohost}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-photohost} -d ${POSTGRES_DB:-photohost}"]
interval: 5s
timeout: 5s
retries: 10
web:
build: .
container_name: photohost-web
restart: unless-stopped
ports:
- "${APP_PORT:-8080}:8000"
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-photohost}:${POSTGRES_PASSWORD:-photohost_secret}@db:5432/${POSTGRES_DB:-photohost}
SECRET_KEY: ${SECRET_KEY:-dev-secret-change-in-production}
MAX_UPLOAD_MB: ${MAX_UPLOAD_MB:-10}
UPLOAD_FOLDER: /app/uploads
volumes:
- uploads_data:/app/uploads
depends_on:
db:
condition: service_healthy
volumes:
postgres_data:
uploads_data: