73 lines
2.0 KiB
YAML
73 lines
2.0 KiB
YAML
services:
|
|
# ── PostgreSQL ──────────────────────────────────────────
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: vfxreview_db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: vfxreview
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ── MinIO (S3-compatible local storage) ────────────────
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: vfxreview_storage
|
|
restart: unless-stopped
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
volumes:
|
|
- minio_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
# ── App (production build) ─────────────────────────────
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
platforms:
|
|
- linux/arm64
|
|
- linux/amd64
|
|
container_name: vfxreview_app
|
|
restart: unless-stopped
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/vfxreview
|
|
NEXTAUTH_URL: http://localhost:3000
|
|
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
|
|
STORAGE_PROVIDER: minio
|
|
MINIO_ENDPOINT: http://minio:9000
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
MINIO_SECRET_KEY: minioadmin
|
|
MINIO_BUCKET_NAME: vfx-review
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./uploads:/app/uploads
|
|
|
|
volumes:
|
|
postgres_data:
|
|
minio_data:
|