#!/bin/bash set -e mkdir -p database chmod 777 database composer install --no-interaction --quiet # Runs as root — migrations may create database/app.sqlite owned by root. php scripts/migrate.php up # Fix ownership after migrations so www-data (Apache) can write. # chmod works on Windows volume mounts even when chown is ignored by p9fs. chmod 777 database chmod 666 database/app.sqlite exec apache2-foreground