From f9a9a0622e40cb310552376e1b27c8fc4ec02eb8 Mon Sep 17 00:00:00 2001 From: kompotkot Date: Wed, 28 Jul 2021 12:40:21 +0300 Subject: [PATCH] Deploy names of service fixes --- backend/deploy/deploy.bash | 11 ++++++++--- backend/deploy/moonstream.service | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/backend/deploy/deploy.bash b/backend/deploy/deploy.bash index db7b099d..c0ad2e06 100755 --- a/backend/deploy/deploy.bash +++ b/backend/deploy/deploy.bash @@ -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" diff --git a/backend/deploy/moonstream.service b/backend/deploy/moonstream.service index f92c48e4..f7b565aa 100644 --- a/backend/deploy/moonstream.service +++ b/backend/deploy/moonstream.service @@ -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]