41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
services:
|
|
app:
|
|
build: .
|
|
restart: unless-stopped
|
|
depends_on:
|
|
mongo:
|
|
condition: service_healthy
|
|
environment:
|
|
- MONGODB_URI=mongodb://mongo:27017/zeitkonto
|
|
- SESSION_SECRET=${SESSION_SECRET:-bitte-langen-zufaelligen-string-einsetzen}
|
|
- APP_USERNAME=${APP_USERNAME:-admin}
|
|
- APP_PASSWORD=${APP_PASSWORD:-bitte-aendern}
|
|
- PORT=3000
|
|
# Optional: Coolify kann hierüber automatisch eine Domain für diesen
|
|
# Service vergeben. Dazu einfach die nächste Zeile einkommentieren
|
|
# (siehe README, Abschnitt "Deployment in Coolify").
|
|
# - SERVICE_FQDN_APP_3000
|
|
ports:
|
|
- '3000:3000'
|
|
healthcheck:
|
|
test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:3000/healthz']
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
mongo:
|
|
image: mongo:7
|
|
restart: unless-stopped
|
|
volumes:
|
|
- mongo_data:/data/db
|
|
healthcheck:
|
|
test: ['CMD', 'mongosh', '--eval', "db.adminCommand('ping')"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
mongo_data:
|