diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-27 03:47:30 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-27 03:47:30 +0300 |
| commit | 059e0d95d0c28bc5060e87e146eaf7411f51bf90 (patch) | |
| tree | 7c21ac432f16dde2329a0d5954d70711eceb48e6 /docker/bin | |
| parent | 26cd8ee99659ef1926c96a049c93645ffc9b169d (diff) | |
| download | gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.gz gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.bz2 gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.zip | |
skeleton commit; based on an anom project
Diffstat (limited to 'docker/bin')
| -rw-r--r-- | docker/bin/docker-entrypoint.sh | 27 | ||||
| -rw-r--r-- | docker/bin/optimize.sh | 17 |
2 files changed, 44 insertions, 0 deletions
diff --git a/docker/bin/docker-entrypoint.sh b/docker/bin/docker-entrypoint.sh new file mode 100644 index 0000000..edcce41 --- /dev/null +++ b/docker/bin/docker-entrypoint.sh @@ -0,0 +1,27 @@ +#! /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 +chown -R www-data:www-data /var/www/public/files +chmod -R 757 /var/www/public/files + +# 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 diff --git a/docker/bin/optimize.sh b/docker/bin/optimize.sh new file mode 100644 index 0000000..02be749 --- /dev/null +++ b/docker/bin/optimize.sh @@ -0,0 +1,17 @@ +!/bin/bash -x + +# optimize performance or development + +if test ["$1" == "PRODUCTION"] ; then + + docker-php-ext-install opcache + # copy OPcache parametres + # etc... + + # install and enable JIT + + # else + # maybe install some development tools + # like XDebug + +fi
\ No newline at end of file |
