@@ -0,0 +1,37 @@
|
||||
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:
|
||||
Reference in New Issue
Block a user