Deploy names of service fixes

pull/21/head
kompotkot 2021-07-28 12:40:21 +03:00
rodzic ca64ebee56
commit f9a9a0622e
2 zmienionych plików z 11 dodań i 6 usunięć

Wyświetl plik

@ -3,20 +3,25 @@
# Deployment script - intended to run on Moonstream servers
# Main
APP_DIR="${APP_DIR:-/home/ubuntu/app}"
APP_DIR="${APP_DIR:-/home/ubuntu/moonstream}"
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-us-east-1}"
PYTHON_ENV_DIR="${PYTHON_ENV_DIR:-/home/ubuntu/app-env}"
PYTHON_ENV_DIR="${PYTHON_ENV_DIR:-/home/ubuntu/moonstream-env}"
PYTHON="${PYTHON_ENV_DIR}/bin/python"
PIP="${PYTHON_ENV_DIR}/bin/pip"
SCRIPT_DIR="$(realpath $(dirname $0))"
PARAMETERS_SCRIPT="${SCRIPT_DIR}/parameters.py"
SECRETS_DIR="${SECRETS_DIR:-/home/ubuntu/app-secrets}"
SECRETS_DIR="${SECRETS_DIR:-/home/ubuntu/moonstream-secrets}"
PARAMETERS_ENV_PATH="${SECRETS_DIR}/app.env"
AWS_SSM_PARAMETER_PATH="${AWS_SSM_PARAMETER_PATH:-/moonstream/prod}"
SERVICE_FILE="${SCRIPT_DIR}/moonstream.service"
set -eu
echo
echo
echo "Updating pip and setuptools"
"${PIP}" install -U pip setuptools
echo
echo
echo "Updating Python dependencies"

Wyświetl plik

@ -5,9 +5,9 @@ After=network.target
[Service]
User=ubuntu
Group=www-data
WorkingDirectory=/home/ubuntu/app
EnvironmentFile=/home/ubuntu/secrets/app.env
ExecStart=/home/ubuntu/server-env/bin/uvicorn --host 0.0.0.0 --port 7481 --workers 8 moonstream.api:app
WorkingDirectory=/home/ubuntu/moonstream
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
ExecStart=/home/ubuntu/moonstream-env/bin/uvicorn --host 0.0.0.0 --port 7481 --workers 8 moonstream.api:app
SyslogIdentifier=moonstream
[Install]