File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ case "$1" in
2525 manage.py migrate --fake-initial
2626 manage.py populate
2727
28- gosu wirecloud /usr/local/bin/gunicorn wirecloud_instance.wsgi:application --forwarded-allow-ips " ${FORWARDED_ALLOW_IPS} " -w 2 -b :8000
28+ # allow the container to be started with `--user`
29+ if [ " $( id -u) " = ' 0' ]; then
30+ gosu wirecloud /usr/local/bin/gunicorn wirecloud_instance.wsgi:application --forwarded-allow-ips " ${FORWARDED_ALLOW_IPS} " -w 2 -b :8000
31+ else
32+ /usr/local/bin/gunicorn wirecloud_instance.wsgi:application --forwarded-allow-ips " ${FORWARDED_ALLOW_IPS} " -w 2 -b :8000
33+ fi
2934 ;;
3035esac
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22cd /opt/wirecloud_instance
3- gosu wirecloud python manage.py $@
3+ if [ " $( id -u) " = ' 0' ]; then
4+ gosu wirecloud python manage.py $@
5+ else
6+ python manage.py $@
7+ fi
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ case "$1" in
2525 manage.py migrate --fake-initial
2626 manage.py populate
2727
28- gosu wirecloud /usr/local/bin/gunicorn wirecloud_instance.wsgi:application --forwarded-allow-ips " ${FORWARDED_ALLOW_IPS} " -w 2 -b :8000
28+ # allow the container to be started with `--user`
29+ if [ " $( id -u) " = ' 0' ]; then
30+ gosu wirecloud /usr/local/bin/gunicorn wirecloud_instance.wsgi:application --forwarded-allow-ips " ${FORWARDED_ALLOW_IPS} " -w 2 -b :8000
31+ else
32+ /usr/local/bin/gunicorn wirecloud_instance.wsgi:application --forwarded-allow-ips " ${FORWARDED_ALLOW_IPS} " -w 2 -b :8000
33+ fi
2934 ;;
3035esac
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22cd /opt/wirecloud_instance
3- gosu wirecloud python manage.py $@
3+ if [ " $( id -u) " = ' 0' ]; then
4+ gosu wirecloud python manage.py $@
5+ else
6+ python manage.py $@
7+ fi
You can’t perform that action at this time.
0 commit comments