diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 0000000..20ea10c --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,4 @@ +.env +.vscode +.venv +__pycache__ \ No newline at end of file diff --git a/backend/.env.sample b/backend/.env.sample index 7b053cb..94b806d 100644 --- a/backend/.env.sample +++ b/backend/.env.sample @@ -6,5 +6,5 @@ TOKEN_URL="https://sso.example.org/application/o/token/" REDIRECT_URL="https://example.org/login-callback" SECRET_KEY= LOAD_INCLUSTER_CONFIG=false -DATABASE_URL=sqlite:///database.db -AUTHENTIK_BASEURL="https://sso.example.org/api/v3" \ No newline at end of file +DATABASE_URL=sqlite:///db/database.db +AUTHENTIK_BASEURL="https://sso.example.org/api/v3" diff --git a/backend/.gitignore b/backend/.gitignore index 0acc03e..35adce7 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -8,4 +8,5 @@ __pycache__ .envrc .direnv run_app.local.sh +db/ *.db diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh index f5a05a4..591defd 100755 --- a/backend/entrypoint.sh +++ b/backend/entrypoint.sh @@ -2,5 +2,6 @@ set -eu env +mkdir -p db flask db upgrade -gunicorn app:app -b 0.0.0.0:5000 --workers "$(nproc)" --reload --capture-output --enable-stdio-inheritance --log-level DEBUG \ No newline at end of file +gunicorn app:app -b 0.0.0.0:5000 --workers "$(nproc)" --reload --capture-output --enable-stdio-inheritance --log-level DEBUG