hotpocket/services/backend/ops/bin/entrypoint-deployment.sh
Tomek Wójcik d909391ee6
Some checks failed
CI / Checks (push) Has been cancelled
Release v1.0.0rc1
2025-08-18 07:09:27 +02:00

37 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -e
cat <<EOF
A
_ _ _ _ _ _
| |__ | |_| |__ | | __ _| |__ ___ _ __ | |
| '_ \| __| '_ \| |/ _\` | '_ \/ __| | '_ \| |
| |_) | |_| | | | | (_| | |_) \__ \_| |_) | |
|_.__/ \__|_| |_|_|\__,_|_.__/|___(_) .__/|_|
|_|
production
HotPocket v1.0.0rc1 [${HOTPOCKET_BACKEND_IMAGE_TAG}] (https://htpocket.app/)
Copyright 2025-present by BTHLabs. All rights reserved. (https://bthlabs.pl/)
Licensed under BTHLabs Source Available License Agreement
EOF
export PYTHONPATH="/srv/app:$PYTHONPATH"
if [ -n "${HOTPOCKET_BACKEND_RUN_MIGRATIONS}" ];then
${VIRTUAL_ENV}/bin/python manage.py migrate
fi
if [[ -n "${HOTPOCKET_BACKEND_INITIAL_ACCOUNT_USERNAME}" && -n "${HOTPOCKET_BACKEND_INITIAL_ACCOUNT_PASSWORD}" ]]; then
${VIRTUAL_ENV}/bin/python manage.py create_initial_account "${HOTPOCKET_BACKEND_INITIAL_ACCOUNT_USERNAME}" "${HOTPOCKET_BACKEND_INITIAL_ACCOUNT_PASSWORD}"
fi
if [ "${HOTPOCKET_BACKEND_ENV}" = "aio" ];then
mkdir -p "${HOTPOCKET_BACKEND_UPLOADS_PATH:-/srv/run/uploads}"
fi
exec /usr/bin/dumb-init "$@"