mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
Use pushd/popd and set ALEMBIC_CONFIG
Replace plain cd with pushd/popd (silenced) when building the frontend and running migrations to preserve the original working directory. Ensure database migrations run from /opt/gramps-web-api and export ALEMBIC_CONFIG in both install and update scripts so Alembic uses the correct config. Minor cleanup to silence directory stack output.
This commit is contained in:
@@ -88,16 +88,20 @@ $STD uv pip install --no-cache-dir --upgrade pip setuptools wheel
|
||||
$STD uv pip install --no-cache-dir gunicorn
|
||||
$STD uv pip install --no-cache-dir /opt/gramps-web-api
|
||||
|
||||
cd /opt/gramps-web/frontend
|
||||
pushd /opt/gramps-web/frontend >/dev/null
|
||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
corepack enable
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
popd >/dev/null
|
||||
|
||||
pushd /opt/gramps-web-api >/dev/null
|
||||
GRAMPS_API_CONFIG=/opt/gramps-web/config/config.cfg \
|
||||
ALEMBIC_CONFIG=/opt/gramps-web-api/alembic.ini \
|
||||
GRAMPSHOME=/opt/gramps-web/data/gramps \
|
||||
GRAMPS_DATABASE_PATH=/opt/gramps-web/data/gramps/grampsdb \
|
||||
$STD /opt/gramps-web/venv/bin/python3 -m gramps_webapi user migrate
|
||||
popd >/dev/null
|
||||
msg_ok "Set up Gramps Web"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
Reference in New Issue
Block a user