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:
@@ -0,0 +1,13 @@
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot /var/www/html/public
|
||||
|
||||
<Directory /var/www/html/public>
|
||||
Options -Indexes +FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
DirectoryIndex index.php
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/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 "$@"
|
||||
Reference in New Issue
Block a user