kopia lustrzana https://github.com/bugout-dev/moonstream
Deploy names of service fixes
rodzic
ca64ebee56
commit
f9a9a0622e
|
@ -3,20 +3,25 @@
|
||||||
# Deployment script - intended to run on Moonstream servers
|
# Deployment script - intended to run on Moonstream servers
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
APP_DIR="${APP_DIR:-/home/ubuntu/app}"
|
APP_DIR="${APP_DIR:-/home/ubuntu/moonstream}"
|
||||||
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-us-east-1}"
|
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"
|
PYTHON="${PYTHON_ENV_DIR}/bin/python"
|
||||||
PIP="${PYTHON_ENV_DIR}/bin/pip"
|
PIP="${PYTHON_ENV_DIR}/bin/pip"
|
||||||
SCRIPT_DIR="$(realpath $(dirname $0))"
|
SCRIPT_DIR="$(realpath $(dirname $0))"
|
||||||
PARAMETERS_SCRIPT="${SCRIPT_DIR}/parameters.py"
|
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"
|
PARAMETERS_ENV_PATH="${SECRETS_DIR}/app.env"
|
||||||
AWS_SSM_PARAMETER_PATH="${AWS_SSM_PARAMETER_PATH:-/moonstream/prod}"
|
AWS_SSM_PARAMETER_PATH="${AWS_SSM_PARAMETER_PATH:-/moonstream/prod}"
|
||||||
SERVICE_FILE="${SCRIPT_DIR}/moonstream.service"
|
SERVICE_FILE="${SCRIPT_DIR}/moonstream.service"
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "Updating pip and setuptools"
|
||||||
|
"${PIP}" install -U pip setuptools
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo "Updating Python dependencies"
|
echo "Updating Python dependencies"
|
||||||
|
|
|
@ -5,9 +5,9 @@ After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
User=ubuntu
|
User=ubuntu
|
||||||
Group=www-data
|
Group=www-data
|
||||||
WorkingDirectory=/home/ubuntu/app
|
WorkingDirectory=/home/ubuntu/moonstream
|
||||||
EnvironmentFile=/home/ubuntu/secrets/app.env
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
ExecStart=/home/ubuntu/server-env/bin/uvicorn --host 0.0.0.0 --port 7481 --workers 8 moonstream.api:app
|
ExecStart=/home/ubuntu/moonstream-env/bin/uvicorn --host 0.0.0.0 --port 7481 --workers 8 moonstream.api:app
|
||||||
SyslogIdentifier=moonstream
|
SyslogIdentifier=moonstream
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Ładowanie…
Reference in New Issue