22 lines
487 B
Bash
Executable File
22 lines
487 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -u
|
|
#set -x
|
|
|
|
# go to the same path as the script
|
|
cd "$(dirname ${0})"
|
|
|
|
cat > .env <<END
|
|
SECRET_KEY=${SECRET_KEY}
|
|
API_BASE_URL=${API_BASE_URL}
|
|
ALLOWED_HOSTS=${ALLOWED_HOSTS:-.localhost,127.0.0.1}
|
|
STATIC_ROOT=${STATIC_ROOT:-/static/}
|
|
DEBUG=True
|
|
END
|
|
|
|
# move the migrate thing in docker entrypoint
|
|
# inspired by https://medium.com/analytics-vidhya/django-with-docker-and-docker-compose-python-part-2-8415976470cc
|
|
./manage.py migrate
|
|
./manage.py runserver 0.0.0.0:8080
|