#! /bin/sh # setup writable directories # ------------------------------------------------------------------------------ # grand to 'cache' directory writable permissions # set file-cache directory to apache's user ownership chmod -R 755 /var/www/storage chown -R www-data:www-data /var/www/storage # copy composer.json to 'www'; then prepare auutoloading # ------------------------------------------------------------------------------ cp /var/www/docker/config/composer-naked.json /var/www/composer.json (cd /var/www ; composer update) (cd /var/www ; composer dump-autoload) ### set -ex ### ### /cloud_sql_proxy -instances=pythia-251711:europe-west4:pythia-db-eu -dir=/cloudsql -credential_file=/cloudsqlproxy.json & ### sleep 3 # start apache # ------------------------------------------------------------------------------ # End with running the original command exec /usr/sbin/apache2ctl -D FOREGROUND