kopia lustrzana https://github.com/bugout-dev/moonstream
Renamed backend moonstream to moonstreamapi for deploy
rodzic
034236ce1e
commit
29e2acdc63
|
@ -23,7 +23,7 @@ jobs:
|
|||
run: pip install -r requirements.txt
|
||||
- name: Mypy type check
|
||||
working-directory: ./backend
|
||||
run: mypy moonstream/
|
||||
run: mypy moonstreamapi/
|
||||
- name: Black syntax check
|
||||
working-directory: ./backend
|
||||
run: black --check moonstream/
|
||||
run: black --check moonstreamapi/
|
||||
|
|
|
@ -31,7 +31,7 @@ CHECKENV_PARAMETERS_SCRIPT="${SCRIPT_DIR}/parameters.bash"
|
|||
CHECKENV_NODES_CONNECTIONS_SCRIPT="${SCRIPT_DIR}/nodes-connections.bash"
|
||||
|
||||
# API server service file
|
||||
SERVICE_FILE="${SCRIPT_DIR}/moonstream.service"
|
||||
SERVICE_FILE="${SCRIPT_DIR}/moonstreamapi.service"
|
||||
|
||||
set -eu
|
||||
|
||||
|
@ -63,9 +63,9 @@ bash "${CHECKENV_NODES_CONNECTIONS_SCRIPT}" -v -f "${PARAMETERS_ENV_PATH}"
|
|||
|
||||
echo
|
||||
echo
|
||||
echo -e "${PREFIX_INFO} Replacing existing Moonstream service definition with ${SERVICE_FILE}"
|
||||
echo -e "${PREFIX_INFO} Replacing existing Moonstream API service definition with ${SERVICE_FILE}"
|
||||
chmod 644 "${SERVICE_FILE}"
|
||||
cp "${SERVICE_FILE}" /etc/systemd/system/moonstream.service
|
||||
cp "${SERVICE_FILE}" /etc/systemd/system/moonstreamapi.service
|
||||
systemctl daemon-reload
|
||||
systemctl restart moonstream.service
|
||||
systemctl status moonstream.service
|
||||
systemctl restart moonstreamapi.service
|
||||
systemctl status moonstreamapi.service
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Unit]
|
||||
Description=moonstream-service
|
||||
Description=moonstreamapi-service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
|
@ -7,8 +7,8 @@ User=ubuntu
|
|||
Group=www-data
|
||||
WorkingDirectory=/home/ubuntu/moonstream/backend
|
||||
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
|
||||
ExecStart=/home/ubuntu/moonstream-env/bin/uvicorn --host 0.0.0.0 --port 7481 --workers 8 moonstreamapi.api:app
|
||||
SyslogIdentifier=moonstreamapi
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -6,4 +6,4 @@ set -e
|
|||
MOONSTREAM_HOST="${MOONSTREAM_HOST:-0.0.0.0}"
|
||||
MOONSTREAM_PORT="${MOONSTREAM_PORT:-7481}"
|
||||
|
||||
uvicorn --port "$MOONSTREAM_PORT" --host "$MOONSTREAM_HOST" moonstream.api:app --reload
|
||||
uvicorn --port "$MOONSTREAM_PORT" --host "$MOONSTREAM_HOST" moonstreamapi.api:app --reload
|
||||
|
|
Ładowanie…
Reference in New Issue