Finish
This commit is contained in:
17
entrypoint.sh
Executable file
17
entrypoint.sh
Executable 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
|
Reference in New Issue
Block a user