teach/compose.yaml
Ramon 0d644ba41d
All checks were successful
dev - build & deploy naar test / build-and-deploy (push) Successful in 27s
feat: voeg afbeeldingscatalogus en opslagquota toe
2026-07-15 23:45:17 +02:00

48 lines
1.2 KiB
YAML

# Lokaal ontwikkelen: bouwt de app zelf en start Postgres ernaast.
# cp .env.example .env (en pas het wachtwoord aan)
# docker compose up --build
# App op http://localhost:3000
services:
app:
build:
context: .
args:
APP_VERSION: dev
depends_on:
db:
condition: service_healthy
environment:
PORT: 3000
DATABASE_URL: ${DATABASE_URL}
APP_VERSION: dev
SUPER_USER: ${SUPER_USER:-beheerder}
SUPER_PASS: ${SUPER_PASS:-}
TRUST_PROXY_HOPS: 0
COOKIE_SECURE: "false"
ports:
- "3000:3000"
volumes:
- image_data:/app/storage/images
restart: unless-stopped
db:
image: postgres:17-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
# Init-scripts draaien alleen bij een lege database
- ./db:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
volumes:
pgdata:
image_data: