mirror of https://github.com/MISP/misp-docker
Add custom entrypoint closes #15
parent
0170dc6427
commit
003d4cd1d7
|
@ -31,6 +31,7 @@ services:
|
||||||
- "./logs/:/var/www/MISP/app/tmp/logs/"
|
- "./logs/:/var/www/MISP/app/tmp/logs/"
|
||||||
- "./files/:/var/www/MISP/app/files"
|
- "./files/:/var/www/MISP/app/files"
|
||||||
- "./ssl/:/etc/ssl/certs"
|
- "./ssl/:/etc/ssl/certs"
|
||||||
|
# - "./examples/custom-entrypoint.sh:/custom-entrypoint.sh" # Use the example custom-entrypoint.sh
|
||||||
environment:
|
environment:
|
||||||
- "CRON_USER_ID=1"
|
- "CRON_USER_ID=1"
|
||||||
- "REDIS_FQDN=redis"
|
- "REDIS_FQDN=redis"
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo Custom Entrypoint that runs just prior to nginx start
|
||||||
|
|
|
@ -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 ..." && 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
|
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
|
# Work around https://github.com/MISP/MISP/issues/5608
|
||||||
if [[ ! -f /var/www/MISP/PyMISP/pymisp/data/describeTypes.json ]]; then
|
if [[ ! -f /var/www/MISP/PyMISP/pymisp/data/describeTypes.json ]]; then
|
||||||
mkdir -p /var/www/MISP/PyMISP/pymisp/data/
|
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
|
ln -s /etc/nginx/sites-available/misp80 /etc/nginx/sites-enabled/misp80
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -x /custom-entrypoint.sh ]]; then
|
||||||
|
/custom-entrypoint.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# delete pid file
|
||||||
|
[ -f $ENTRYPOINT_PID_FILE ] && rm $ENTRYPOINT_PID_FILE
|
||||||
|
|
||||||
# Start NGINX
|
# Start NGINX
|
||||||
nginx -g 'daemon off;'
|
nginx -g 'daemon off;'
|
||||||
|
|
Loading…
Reference in New Issue