This commit is contained in:
2024-11-14 02:06:21 +08:00
commit 29ce03dbc5
24 changed files with 1042 additions and 0 deletions

17
entrypoint.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
if [ -f "$SECRET_KEY_FILE" ]; then
export SECRET_KEY=$(cat $SECRET_KEY_FILE)
fi
if [ -f "$POSTGRES_PASSWORD_FILE" ]; then
export POSTGRES_PASSWORD=$(cat $POSTGRES_PASSWORD_FILE)
fi
poetry run python manage.py migrate
poetry run gunicorn url_shortener.wsgi:application \
--bind 0.0.0.0:8000 \
--workers 3 \
--log-level info \
--timeout 30