Add docker files

This commit is contained in:
2025-05-10 08:45:23 +02:00
parent e766b06d5c
commit e22f9b8f10
6 changed files with 127 additions and 0 deletions

15
docker/backend.entrypoint.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
fail() {
printf '%s\n' "$1" >&2 ## Send message to stderr.
exit "${2-1}" ## Return a code specified by $2, or 1 by default.
}
[[ -d migrations ]] || fail "Error: Must be run from the backend directory."
[[ -d /opt/sshecret-backend-db ]] || mkdir /opt/sshecret-backend-db
export SSHECRET_BACKEND_DATABASE="/opt/sshecret-backend-db/sshecret.db"
alembic upgrade head
sshecret-backend run --host 0.0.0.0