Skip to content

Commit

Permalink
chore(Docker): add GEN3_DEBUG flag
Browse files Browse the repository at this point in the history
  • Loading branch information
frickjack committed Aug 15, 2018
1 parent cd88d0c commit 1315800
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ WORKDIR /var/www/indexd


RUN ln -sf /dev/stdout /var/log/apache2/access.log && ln -sf /dev/stderr /var/log/apache2/error.log
CMD rm -f /var/run/apache2/apache2.pid && /indexd/dockerrun.bash
CMD rm -rf /var/run/apache2/apache2.pid && /indexd/dockerrun.bash
15 changes: 14 additions & 1 deletion dockerrun.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#!/bin/bash

sed -i.bak -e 's/WSGIDaemonProcess indexd processes=1 threads=3/WSGIDaemonProcess indexd processes='${WSGI_PROCESSES:-1}' threads='${WSGI_THREADS:-3}'/g' /etc/apache2/sites-available/apache-indexd.conf
cd /var/www/indexd; sudo -u www-data python wsgi.py
cd /var/www/indexd
#
# Update certificate authority index -
# environment may have mounted more authorities
#
update-ca-certificates
#
# Enable debug flag based on GEN3_DEBUG environment
#
if [ -f ./wsgi.py && "$GEN3_DEBUG" == "True" ]; then
echo -e "\napplication.debug=True\n" >> ./wsgi.py
fi

sudo -u www-data python wsgi.py
/usr/sbin/apache2ctl -D FOREGROUND

0 comments on commit 1315800

Please sign in to comment.