Add Docker Compose setup for local runs

PHP 8.3 + Apache image serving public/ on port 8080, with pdo_sqlite and
mbstring built in. The container entrypoint applies migrations as www-data
before starting Apache; the SQLite database and generated JWT signing key
persist in a named "storage" volume. `docker compose up -d` is now the
primary way to run the project without a local PHP toolchain.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-03 17:45:35 +01:00
co-authored by Claude Sonnet 5
parent 0938e1a59b
commit 15145865d4
6 changed files with 121 additions and 6 deletions
+18
View File
@@ -0,0 +1,18 @@
services:
app:
build: .
image: php-todo-list
ports:
- "8080:80"
environment:
APP_DEBUG: "${APP_DEBUG:-false}"
# Leave blank to auto-generate a secret into the storage volume on first run.
JWT_SECRET: "${JWT_SECRET:-}"
JWT_TTL: "${JWT_TTL:-86400}"
volumes:
# Persists the SQLite database and the generated signing key across restarts.
- storage:/var/www/html/storage
restart: unless-stopped
volumes:
storage: