cc-docker/php-fpm/entrypoint.sh

25 lines
695 B
Bash
Raw Permalink Normal View History

2021-05-19 14:27:44 +02:00
#!/usr/bin/env bash
if [ "$APP_CLUSTERCOCKPIT_INIT" = true ]; then
2021-06-09 09:53:35 +02:00
rm -rf /var/www/symfony/* /var/www/symfony/.??*
2021-09-13 13:20:43 +02:00
git clone -b $CLUSTERCOCKPIT_BRANCH https://github.com/ClusterCockpit/ClusterCockpit .
if [ "$APP_ENV" = dev ]; then
composer install --no-progress --optimize-autoloader
yarn install
yarn encore dev
else
composer install --no-dev --no-progress --optimize-autoloader
yarn install
yarn encore production
fi
2021-06-09 09:53:35 +02:00
ln -s /var/lib/job-archive var/job-archive
chown -R www-data:www-data /var/www/symfony/* /var/www/symfony/.??*
2021-06-09 09:53:35 +02:00
fi
2021-05-19 14:27:44 +02:00
# Reports php environment on container startup
php bin/console about
2021-05-19 14:27:44 +02:00
exec "$@"