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>
14 lines
374 B
Bash
Executable File
14 lines
374 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
# The storage directory may be a freshly created named volume; make sure it
|
|
# exists and is writable by the web-server user.
|
|
mkdir -p storage
|
|
chown -R www-data:www-data storage
|
|
|
|
# Apply pending migrations as www-data so the SQLite file it creates stays
|
|
# writable by Apache.
|
|
su -s /bin/sh -c 'php bin/migrate.php' www-data
|
|
|
|
exec docker-php-entrypoint "$@"
|