script improvements
This commit is contained in:
parent
72eef4d08b
commit
23d4954854
@ -28,9 +28,7 @@ function update_script() {
|
|||||||
msg_error "No ${APP} installation found!"
|
msg_error "No ${APP} installation found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "endurain" "joaovitoriasilva/endurain"; then
|
if check_for_gh_release "endurain" "joaovitoriasilva/endurain"; then
|
||||||
|
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop endurain
|
systemctl stop endurain
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
@ -52,8 +50,6 @@ function update_script() {
|
|||||||
rm /opt/endurain.env
|
rm /opt/endurain.env
|
||||||
msg_ok "Prepared Update"
|
msg_ok "Prepared Update"
|
||||||
|
|
||||||
msg_ok "Prepared Update"
|
|
||||||
|
|
||||||
msg_info "Updating Frontend"
|
msg_info "Updating Frontend"
|
||||||
cd /opt/endurain/frontend/app
|
cd /opt/endurain/frontend/app
|
||||||
$STD npm ci
|
$STD npm ci
|
||||||
|
|||||||
@ -14,7 +14,10 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y default-libmysqlclient-dev build-essential pkg-config
|
$STD apt install -y \
|
||||||
|
default-libmysqlclient-dev \
|
||||||
|
build-essential \
|
||||||
|
pkg-config
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PYTHON_VERSION="3.13" setup_uv
|
PYTHON_VERSION="3.13" setup_uv
|
||||||
@ -24,9 +27,7 @@ PG_VERSION="17" PG_MODULES="postgis,contrib" setup_postgresql
|
|||||||
fetch_and_deploy_gh_release "endurain" "joaovitoriasilva/endurain" "tarball" "latest" "/opt/endurain"
|
fetch_and_deploy_gh_release "endurain" "joaovitoriasilva/endurain" "tarball" "latest" "/opt/endurain"
|
||||||
|
|
||||||
msg_info "Setting up Endurain"
|
msg_info "Setting up Endurain"
|
||||||
PG_DB_NAME="enduraindb" PG_DB_USER="endurain" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
|
PG_DB_NAME="enduraindb" PG_DB_USER="endurain" setup_postgresql_db
|
||||||
PG_DB_HOST=localhost
|
|
||||||
PG_DB_PORT=5432
|
|
||||||
|
|
||||||
cd /opt/endurain
|
cd /opt/endurain
|
||||||
rm -rf \
|
rm -rf \
|
||||||
@ -54,10 +55,10 @@ PGDATA=/var/lib/postgresql/${PG_DB_NAME}
|
|||||||
|
|
||||||
DB_DATABASE=${PG_DB_NAME}
|
DB_DATABASE=${PG_DB_NAME}
|
||||||
DB_USER=${PG_DB_USER}
|
DB_USER=${PG_DB_USER}
|
||||||
DB_PORT=${PG_DB_PORT}
|
DB_PORT=5432
|
||||||
DB_HOST=${PG_DB_HOST}
|
DB_HOST=localhost
|
||||||
|
|
||||||
DATABASE_URL=postgresql+psycopg://${PG_DB_USER}:${PG_DB_PASS}@${PG_DB_HOST}:${PG_DB_PORT}/${PG_DB_NAME}
|
DATABASE_URL=postgresql+psycopg://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
|
||||||
|
|
||||||
BACKEND_DIR="/opt/endurain/backend/app"
|
BACKEND_DIR="/opt/endurain/backend/app"
|
||||||
FRONTEND_DIR="/opt/endurain/frontend/app/dist"
|
FRONTEND_DIR="/opt/endurain/frontend/app/dist"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user