2026-09-03 17:45:35 +01:00
|
|
|
services:
|
|
|
|
|
app:
|
|
|
|
|
build: .
|
|
|
|
|
image: php-todo-list
|
|
|
|
|
ports:
|
|
|
|
|
- "8080:80"
|
|
|
|
|
environment:
|
|
|
|
|
APP_DEBUG: "${APP_DEBUG:-false}"
|
2026-09-03 17:51:56 +01:00
|
|
|
# Generated files (SQLite DB + JWT signing key) go here, on their own
|
|
|
|
|
# volume so they don't overlap the bind mount below.
|
|
|
|
|
STORAGE_PATH: /var/www/storage
|
2026-09-03 17:45:35 +01:00
|
|
|
# Leave blank to auto-generate a secret into the storage volume on first run.
|
|
|
|
|
JWT_SECRET: "${JWT_SECRET:-}"
|
|
|
|
|
JWT_TTL: "${JWT_TTL:-86400}"
|
|
|
|
|
volumes:
|
2026-09-03 17:51:56 +01:00
|
|
|
# Live source: edit on the host, no image rebuild needed.
|
|
|
|
|
- .:/var/www/html
|
|
|
|
|
# Persistent storage, kept outside /var/www/html to avoid a nested mount.
|
|
|
|
|
- storage:/var/www/storage
|
2026-09-03 17:45:35 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
storage:
|