mirror of https://github.com/MISP/misp-docker
Move php config to a fpm entrypoint
parent
555b8e4c64
commit
3902256c9c
|
@ -126,6 +126,7 @@ ARG PHP_VER
|
||||||
|
|
||||||
# Entrypoints
|
# Entrypoints
|
||||||
COPY files/etc/supervisor/supervisor.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY files/etc/supervisor/supervisor.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
COPY files/entrypoint_fpm.sh /
|
||||||
COPY files/entrypoint_nginx.sh /
|
COPY files/entrypoint_nginx.sh /
|
||||||
COPY files/entrypoint_cron.sh /
|
COPY files/entrypoint_cron.sh /
|
||||||
COPY files/entrypoint_workers.sh /
|
COPY files/entrypoint_workers.sh /
|
||||||
|
|
|
@ -12,17 +12,6 @@ MISP_APP_CONFIG_PATH=/var/www/MISP/app/Config
|
||||||
ENTRYPOINT_PID_FILE="/entrypoint_apache.install"
|
ENTRYPOINT_PID_FILE="/entrypoint_apache.install"
|
||||||
[ ! -f $ENTRYPOINT_PID_FILE ] && touch $ENTRYPOINT_PID_FILE
|
[ ! -f $ENTRYPOINT_PID_FILE ] && touch $ENTRYPOINT_PID_FILE
|
||||||
|
|
||||||
change_php_vars(){
|
|
||||||
for FILE in /etc/php/*/fpm/php.ini
|
|
||||||
do
|
|
||||||
[[ -e $FILE ]] || break
|
|
||||||
sed -i "s/memory_limit = .*/memory_limit = 2048M/" "$FILE"
|
|
||||||
sed -i "s/max_execution_time = .*/max_execution_time = 300/" "$FILE"
|
|
||||||
sed -i "s/upload_max_filesize = .*/upload_max_filesize = 50M/" "$FILE"
|
|
||||||
sed -i "s/post_max_size = .*/post_max_size = 50M/" "$FILE"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_cake_config(){
|
setup_cake_config(){
|
||||||
sed -i "s/'host' => 'localhost'.*/'host' => '$REDIS_FQDN', \/\/ Redis server hostname/" "/var/www/MISP/app/Plugin/CakeResque/Config/config.php"
|
sed -i "s/'host' => 'localhost'.*/'host' => '$REDIS_FQDN', \/\/ Redis server hostname/" "/var/www/MISP/app/Plugin/CakeResque/Config/config.php"
|
||||||
}
|
}
|
||||||
|
@ -110,7 +99,6 @@ fi
|
||||||
echo "Initialize misp base config..." && init_misp_config
|
echo "Initialize misp base config..." && init_misp_config
|
||||||
|
|
||||||
# Things that should ALWAYS happen
|
# Things that should ALWAYS happen
|
||||||
echo "Configure PHP | Change PHP values ..." && change_php_vars
|
|
||||||
echo "Configure Cake | Change Redis host to $REDIS_FQDN ... " && setup_cake_config
|
echo "Configure Cake | Change Redis host to $REDIS_FQDN ... " && setup_cake_config
|
||||||
echo "Configure MISP | Enforce permissions ..."
|
echo "Configure MISP | Enforce permissions ..."
|
||||||
echo "... chown -R www-data.www-data /var/www/MISP ..." && find /var/www/MISP -not -user www-data -exec chown www-data.www-data {} +
|
echo "... chown -R www-data.www-data /var/www/MISP ..." && find /var/www/MISP -not -user www-data -exec chown www-data.www-data {} +
|
||||||
|
|
|
@ -15,7 +15,7 @@ stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
[program:php-fpm]
|
[program:php-fpm]
|
||||||
command=/usr/sbin/php-fpm7.3 -R -F
|
command=/entrypoint_fpm.sh
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
numprocs=1
|
numprocs=1
|
||||||
autostart=true
|
autostart=true
|
||||||
|
|
Loading…
Reference in New Issue