mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-22 17:33:12 +00:00
arrange entrypoints and commands for docker
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
chown -R app:app /var/alchemy/Phraseanet/config
|
||||
chown -R app:app /var/alchemy/Phraseanet/datas
|
||||
chown -R app:app /var/alchemy/Phraseanet/tmp
|
||||
chown -R app:app /var/alchemy/Phraseanet/www/thumbnails
|
||||
FILE=/var/alchemy/Phraseanet/config/configuration.yml
|
||||
if [ -f "$FILE" ]; then
|
||||
echo "$FILE exist, skip setup."
|
||||
else
|
||||
echo "$FILE doesn't exist, entering setup..."
|
||||
runuser app -c '/auto-install.sh'
|
||||
fi
|
||||
|
||||
php-fpm -F
|
||||
25
docker/phraseanet/phraseanet/entrypoint.sh
Executable file
25
docker/phraseanet/phraseanet/entrypoint.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
envsubst < /php.ini.sample > /usr/local/etc/php/php.ini
|
||||
envsubst < /php-fpm.conf.sample > /usr/local/etc/php-fpm.conf
|
||||
|
||||
chown -R app:app /var/alchemy/Phraseanet/config
|
||||
chown -R app:app /var/alchemy/Phraseanet/datas
|
||||
chown -R app:app /var/alchemy/Phraseanet/tmp
|
||||
chown -R app:app /var/alchemy/Phraseanet/www/thumbnails
|
||||
FILE=/var/alchemy/Phraseanet/config/configuration.yml
|
||||
if [ -f "$FILE" ]; then
|
||||
echo "$FILE exists, skip setup."
|
||||
else
|
||||
echo "$FILE doesn't exist, entering setup..."
|
||||
runuser app -c '/phraseanet/auto-install.sh'
|
||||
fi
|
||||
|
||||
if [ ${XDEBUG_ENABLED} == "1" ]; then
|
||||
echo "XDEBUG is enabled. YOU MAY KEEP THIS FEATURE DISABLED IN PRODUCTION."
|
||||
docker-php-ext-enable xdebug
|
||||
fi
|
||||
|
||||
bash -e docker-php-entrypoint $@
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p /var/alchemy/Phraseanet/tmp/locks \
|
||||
&& chown -R app:app /var/alchemy/Phraseanet/tmp
|
||||
|
||||
envsubst < /php.ini.sample > /usr/local/etc/php/php.ini
|
||||
envsubst < /php-fpm.conf.sample > /usr/local/etc/php-fpm.conf
|
||||
|
||||
3
docker/phraseanet/phraseanet/worker/scheduler-run.sh
Executable file
3
docker/phraseanet/phraseanet/worker/scheduler-run.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
runuser app -c 'php /var/alchemy/Phraseanet/bin/console task-manager:scheduler:run'
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ${XDEBUG_ENABLED} == "1" ]; then
|
||||
echo "XDEBUG is enabled. YOU MAY KEEP THIS FEATURE DISABLED IN PRODUCTION."
|
||||
docker-php-ext-enable xdebug
|
||||
fi
|
||||
|
||||
mkdir /var/alchemy/Phraseanet/tmp/locks && chown -R app:app /var/alchemy/Phraseanet/tmp
|
||||
runuser app -c 'php /var/alchemy/Phraseanet/bin/console task-manager:scheduler:run'
|
||||
Reference in New Issue
Block a user