14 lines
374 B
Bash
14 lines
374 B
Bash
#!/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 "$@"
|