Add custom entrypoint closes #15

pull/1/head
Jason Kendall 2020-03-06 11:00:35 -05:00
parent 0170dc6427
commit 003d4cd1d7
3 changed files with 12 additions and 3 deletions

View File

@ -31,6 +31,7 @@ services:
- "./logs/:/var/www/MISP/app/tmp/logs/"
- "./files/:/var/www/MISP/app/files"
- "./ssl/:/etc/ssl/certs"
# - "./examples/custom-entrypoint.sh:/custom-entrypoint.sh" # Use the example custom-entrypoint.sh
environment:
- "CRON_USER_ID=1"
- "REDIS_FQDN=redis"

4
examples/custom-entrypoint.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
echo Custom Entrypoint that runs just prior to nginx start

View File

@ -106,9 +106,6 @@ echo "... chmod -R g+ws /var/www/MISP/app/tmp ..." && chmod -R g+ws /var/www/MIS
echo "... chmod -R g+ws /var/www/MISP/app/files ..." && chmod -R g+ws /var/www/MISP/app/files
echo "... chmod -R g+ws /var/www/MISP/app/files/scripts/tmp ..." && chmod -R g+ws /var/www/MISP/app/files/scripts/tmp
# delete pid file
[ -f $ENTRYPOINT_PID_FILE ] && rm $ENTRYPOINT_PID_FILE
# Work around https://github.com/MISP/MISP/issues/5608
if [[ ! -f /var/www/MISP/PyMISP/pymisp/data/describeTypes.json ]]; then
mkdir -p /var/www/MISP/PyMISP/pymisp/data/
@ -121,5 +118,12 @@ else
ln -s /etc/nginx/sites-available/misp80 /etc/nginx/sites-enabled/misp80
fi
if [[ -x /custom-entrypoint.sh ]]; then
/custom-entrypoint.sh
fi
# delete pid file
[ -f $ENTRYPOINT_PID_FILE ] && rm $ENTRYPOINT_PID_FILE
# Start NGINX
nginx -g 'daemon off;'