Update healthchecks-install.sh
This commit is contained in:
parent
f9d60db88e
commit
802cc6cc57
@ -52,13 +52,15 @@ msg_ok "Set up Database"
|
|||||||
msg_info "Setup healthchecks"
|
msg_info "Setup healthchecks"
|
||||||
fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "source"
|
fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "source"
|
||||||
cd /opt/healthchecks
|
cd /opt/healthchecks
|
||||||
|
mkdir -p /opt/healthchecks/static-collected/
|
||||||
$STD uv venv .venv
|
$STD uv venv .venv
|
||||||
$STD source .venv/bin/activate
|
$STD source .venv/bin/activate
|
||||||
$STD uv pip install wheel
|
$STD uv pip install wheel
|
||||||
$STD uv pip install gunicorn
|
$STD uv pip install gunicorn
|
||||||
$STD uv pip install -r requirements.txt
|
$STD uv pip install -r requirements.txt
|
||||||
|
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||||
cat <<EOF >/opt/healthchecks/.env
|
cat <<EOF >/opt/healthchecks/.env
|
||||||
ALLOWED_HOSTS=0.0.0.0
|
ALLOWED_HOSTS=${LOCAL_IP},localhost,127.0.0.1
|
||||||
DB=postgres
|
DB=postgres
|
||||||
DB_HOST=localhost
|
DB_HOST=localhost
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
@ -87,7 +89,8 @@ SITE_ROOT=http://0.0.0.0:8000
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
$STD .venv/bin/python3 manage.py makemigrations
|
$STD .venv/bin/python3 manage.py makemigrations
|
||||||
$STD .venv/bin/python3 manage.py migrate
|
$STD .venv/bin/python3 manage.py migrate --noinput
|
||||||
|
$STD .venv/bin/python3 manage.py collectstatic --noinput
|
||||||
|
|
||||||
ADMIN_EMAIL="admin@helper-scripts.local"
|
ADMIN_EMAIL="admin@helper-scripts.local"
|
||||||
ADMIN_PASSWORD="$DB_PASS"
|
ADMIN_PASSWORD="$DB_PASS"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user