mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-01-09 07:28:34 +01:00
Merge pull request #1227 from feroda/main
Entrypoint adapted to be run multiple times and --noreload arg added to runserver to stop the container with CTRL-C
This commit is contained in:
commit
43a71e89f7
@ -43,3 +43,4 @@ FROM python-run-stage AS backend
|
||||
COPY . ${APP_HOME}
|
||||
|
||||
ENTRYPOINT ["/entrypoint"]
|
||||
CMD ["python3", "demo/manage.py", "runserver", "--noreload", "0.0.0.0:8080"]
|
||||
|
14
entrypoint
14
entrypoint
@ -7,8 +7,12 @@ set -o nounset
|
||||
pip3 install -e . --user || pip3 install -e .
|
||||
pip3 install -e demo --user || pip3 install -e demo
|
||||
python3 demo/manage.py migrate --noinput
|
||||
DJANGO_SUPERUSER_PASSWORD=Test1234 python3 demo/manage.py createsuperuser --username admin --email helpdesk@example.com --noinput
|
||||
# Install fixtures
|
||||
python3 demo/manage.py loaddata emailtemplate.json
|
||||
python3 demo/manage.py loaddata demo.json
|
||||
python3 demo/manage.py runserver 0:8080
|
||||
|
||||
if [ ! -e "/app/demo/demodesk/db.sqlite3" ]; then
|
||||
DJANGO_SUPERUSER_PASSWORD=Test1234 python3 demo/manage.py createsuperuser --username admin --email helpdesk@example.com --noinput
|
||||
# Install fixtures
|
||||
python3 demo/manage.py loaddata emailtemplate.json
|
||||
python3 demo/manage.py loaddata demo.json
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user