diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-12 07:16:23 +0200 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-12 07:16:23 +0200 |
| commit | 7076343338ae3439f3c86f01144818abe8c31978 (patch) | |
| tree | 794abb1e6b8f821091fd095341885496b6dad51d /docker/bin | |
| parent | 47cbb529f5723b246125ae083a193e11481b89ef (diff) | |
| download | classroom-7076343338ae3439f3c86f01144818abe8c31978.tar.gz classroom-7076343338ae3439f3c86f01144818abe8c31978.tar.bz2 classroom-7076343338ae3439f3c86f01144818abe8c31978.zip | |
add container helpers; constuct public directory-tree
Diffstat (limited to 'docker/bin')
| -rw-r--r-- | docker/bin/docker-entrypoint.sh | 19 | ||||
| -rw-r--r-- | docker/bin/optimize.sh | 17 |
2 files changed, 36 insertions, 0 deletions
diff --git a/docker/bin/docker-entrypoint.sh b/docker/bin/docker-entrypoint.sh new file mode 100644 index 0000000..236c4fb --- /dev/null +++ b/docker/bin/docker-entrypoint.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +# grand to 'cache' directory writable permissions +# set file-cache directory to apache's user ownership +chmod -R 755 /var/www/html/cache +chown -R www-data:www-data /var/www/html/cache + +# 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 + +# End with running the original command +exec /usr/sbin/apache2ctl -D FOREGROUND
\ No newline at end of file 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 |
