PHRDPL-36 #comment remove supervisord & configure vars at startup

This commit is contained in:
Alexandre BRACH
2019-06-07 17:05:32 +02:00
parent 501a60e604
commit 040172b509
5 changed files with 31 additions and 41 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/bash
set -xe
/var/alchemy/Phraseanet/bin/setup system:install \
--email=$INSTALL_ACCOUNT_EMAIL \
--password=$INSTALL_ACCOUNT_PASSWORD \
@@ -18,10 +20,25 @@
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.base_aggregate_limit 10
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.collection_aggregate_limit 10
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.doctype_aggregate_limit 10
/var/alchemy/Phraseanet/bin/console compile:configuration
## Redis
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.host redis
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.port 6379
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.domain $INSTALL_SERVER_NAME
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis
# RabbitMQ
bin/setup system:config set rabbitmq.server.host rabbitmq
bin/setup system:config set rabbitmq.server.port 5672
bin/setup system:config set rabbitmq.server.user $INSTALL_RABBITMQ_USER
bin/setup system:config set rabbitmq.server.password $INSTALL_RABBITMQ_PASSWORD
bin/setup system:config set rabbitmq.server.vhost /
/var/alchemy/Phraseanet/bin/console searchengine:index -c
## enable API and disable ssl on it
/var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled true
/var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl false
/var/alchemy/Phraseanet/bin/console comp:conf
/var/alchemy/Phraseanet/bin/console compile:configuration

View File

@@ -1,8 +1,5 @@
#!/bin/bash
envsubst < /php.ini.sample > /usr/local/etc/php/php.ini
envsubst < /php-fpm.conf.sample > /usr/local/etc/php-fpm.conf
FILE=/var/alchemy/Phraseanet/config/configuration.yml
if [ -f "$FILE" ]; then
echo "$FILE exist, skip setup."

View File

@@ -1,28 +0,0 @@
[program:scheduler-phraseanet]
command=php /var/alchemy/Phraseanet/bin/console task-manager:scheduler:run ; the program (relative uses PATH, can take args)
stdout_logfile=/var/log/supervisor/scheduler-phraseanet.log ; stdout log path, NONE for none; default AUTO
stderr_logfile=/var/log/supervisor/scheduler-phraseanet_error.log ; stderr log path, NONE for none; default AUTO
process_name=%(program_name)s ; process_name expr (default %(program_name)s)
numprocs=1 ; number of processes copies to start (def 1)
directory=/tmp ; directory to cwd to before exec (def no cwd)
priority=999 ; the relative start priority (default 999)
autostart=true ; start at supervisord start (default: true)
autorestart=true ; whether/when to restart (default: unexpected)
startsecs=0 ; number of secs prog must stay running (def. 1)
startretries=3 ; max # of serial start failures (default 3)
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
stopsignal=INT ; signal used to kill process (default TERM)
stopwaitsecs=20 ; max num secs to wait b4 SIGKILL (default 10)
stopasgroup=true ; send stop signal to the UNIX process group (default false)
killasgroup=true ; SIGKILL the UNIX process group (def false)
redirect_stderr=true ; redirect proc stderr to stdout (default false)
user=1000 ; setuid to this UNIX account to run the program
stdout_logfile_maxbytes=50MB ; max # logfile bytes b4 rotation (default 50MB)
stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
stdout_events_enabled=false ; emit events on stdout writes (default false)
stderr_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
stderr_events_enabled=false ; emit events on stderr writes (default false)
environment=HOME=/var/alchemy/Phraseanet,USER=app,PATH="/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin" ; process environment additions (def no add)

View File

@@ -0,0 +1,8 @@
#!/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
docker-php-entrypoint $@