Initial
This commit is contained in:
24
container-files/usr/local/bin/install-django-test.sh
Executable file
24
container-files/usr/local/bin/install-django-test.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
DJANGO_PROJECT_NAME="django-test"
|
||||
PROJECT_REPO_URL="git+https://heinzelwelt.de/vcs/python/django-test"
|
||||
|
||||
BASE_DIR="/var/www/wsgi/${DJANGO_PROJECT_NAME}"
|
||||
VENV_DIR="python"
|
||||
VENV_PATH="${BASE_DIR}/${VENV_DIR}"
|
||||
DJANGO_DIR="django"
|
||||
DJANGO_PATH="${BASE_DIR}/${DJANGO_DIR}"
|
||||
|
||||
mkdir -p "$BASE_DIR"
|
||||
python3 -m venv "${VENV_PATH}"
|
||||
source "${VENV_PATH}/bin/activate"
|
||||
pip install --upgrade pip
|
||||
pip install "$PROJECT_REPO_URL"
|
||||
django-test-admin setup "${DJANGO_PATH}"
|
||||
python3 "${DJANGO_PATH}/manage.py" collectstatic --noinput
|
||||
|
||||
cat <<E-O-H >> "${DJANGO_PATH}/main/settings.py"
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
DEBUG = True
|
||||
E-O-H
|
||||
2
container-files/usr/local/sbin/start-httpd.sh
Executable file
2
container-files/usr/local/sbin/start-httpd.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /usr/sbin/httpd -DFOREGROUND $@
|
||||
Reference in New Issue
Block a user