From 173df0fd6ffa69c89a0a5c76442a4d6a5c6bcca7 Mon Sep 17 00:00:00 2001 From: Asger Geel Weirsoee Date: Sat, 28 Feb 2026 11:20:54 +0000 Subject: [PATCH] fix(staging): ensure wpp can write sqlite db during deploy --- infra/staging/deploy_staging.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/infra/staging/deploy_staging.sh b/infra/staging/deploy_staging.sh index b440c3c..3f690c0 100755 --- a/infra/staging/deploy_staging.sh +++ b/infra/staging/deploy_staging.sh @@ -17,6 +17,11 @@ rm -rf src && mkdir src tar -xzf app.tar.gz -C src --strip-components=1 rm -rf /opt/wpp-staging/app/* cp -a src/. /opt/wpp-staging/app/ +# Ensure deploy artifact copied as root does not leave SQLite/app tree non-writable for wpp. +chown -R wpp:wpp /opt/wpp-staging/app +if [ -f /opt/wpp-staging/app/db.sqlite3 ]; then + chmod 664 /opt/wpp-staging/app/db.sqlite3 +fi cd /opt/wpp-staging/app runuser -u wpp -- python3 -m venv .venv runuser -u wpp -- .venv/bin/pip install -U pip >/dev/null