Engine API deployment update

pull/812/head
kompotkot 2023-06-07 10:50:34 +00:00
rodzic 8df6ba410d
commit 660d7a7f49
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -16,11 +16,11 @@ PREFIX_CRIT="${C_RED}[CRIT]${C_RESET} [$(date +%d-%m\ %T)]"
# Main
APP_DIR="${APP_DIR:-/home/ubuntu/api/engineapi}"
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-us-east-1}"
PYTHON_ENV_DIR="${PYTHON_ENV_DIR:-/home/ubuntu/engine-env}"
PYTHON_ENV_DIR="${PYTHON_ENV_DIR:-/home/ubuntu/engineapi-env}"
PYTHON="${PYTHON_ENV_DIR}/bin/python"
PIP="${PYTHON_ENV_DIR}/bin/pip"
SCRIPT_DIR="$(realpath $(dirname $0))"
SECRETS_DIR="${SECRETS_DIR:-/home/ubuntu/engine-secrets}"
SECRETS_DIR="${SECRETS_DIR:-/home/ubuntu/engineapi-secrets}"
PARAMETERS_ENV_PATH="${SECRETS_DIR}/app.env"
# API server service file

Wyświetl plik

@ -6,7 +6,7 @@ StartLimitBurst=3
[Service]
WorkingDirectory=/home/ubuntu/api/engineapi
EnvironmentFile=/home/ubuntu/engine-secrets/app.env
EnvironmentFile=/home/ubuntu/engineapi-secrets/app.env
Restart=on-failure
RestartSec=15s
ExecStart=/home/ubuntu/engine-env/bin/uvicorn --proxy-headers --forwarded-allow-ips='127.0.0.1' --host 127.0.0.1 --port 7191 --workers 8 engineapi.api:app