modcomms/docker-compose.yml
michael 907c3a520e Fix large file preview and download issues
- Add persistent Docker volume for file storage to fix 404 download errors
- Set FILE_STORAGE_PATH env var in Dockerfile and docker-compose.yml
- Increase thumbnail generation limit from 500KB to 10MB for images
- Remove encodeURIComponent from file download URL to prevent path encoding

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:06:41 -06:00

48 lines
1.3 KiB
YAML
Executable file

services:
postgres:
image: postgres:16-alpine
ports:
- "${POSTGRES_PORT:-5432}:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-modcomms}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-modcomms_dev}
POSTGRES_DB: ${POSTGRES_DB:-modcomms}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-modcomms} -d ${POSTGRES_DB:-modcomms}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "${BACKEND_PORT:-8000}:8000"
env_file:
- backend/.env
environment:
- HOST=0.0.0.0
- PORT=8000
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER:-modcomms}:${POSTGRES_PASSWORD:-modcomms_dev}@postgres:5432/${POSTGRES_DB:-modcomms}
- FILE_STORAGE_PATH=/app/storage
volumes:
- file_storage:/app/storage
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
volumes:
postgres_data:
file_storage: