mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-10 19:05:09 +00:00
Merge 4bb27b0620
into 19e7751fb9
This commit is contained in:
commit
f048725828
@ -40,7 +40,10 @@ function update_script() {
|
||||
msg_ok "Stopped Services"
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt
|
||||
mv /opt/hoarder/.env /opt/.env
|
||||
if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then
|
||||
mkdir -p /etc/hoarder
|
||||
mv /opt/hoarder/.env /etv/hoarder/hoarder.env
|
||||
fi
|
||||
rm -rf /opt/hoarder
|
||||
wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
@ -54,8 +57,7 @@ function update_script() {
|
||||
export DATA_DIR=/opt/hoarder_data
|
||||
cd /opt/hoarder/packages/db
|
||||
pnpm migrate &>/dev/null
|
||||
mv /opt/.env /opt/hoarder/.env
|
||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /opt/hoarder/.env
|
||||
sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Services"
|
||||
|
@ -78,7 +78,8 @@ $STD pnpm install --frozen-lockfile
|
||||
|
||||
export DATA_DIR=/opt/hoarder_data
|
||||
HOARDER_SECRET=$(openssl rand -base64 36 | cut -c1-24)
|
||||
cat <<EOF >/opt/hoarder/.env
|
||||
mkdir -p /etc/hoarder
|
||||
cat <<EOF >/etc/hoarder/hoarder.env
|
||||
SERVER_VERSION=$RELEASE
|
||||
NEXTAUTH_SECRET="$HOARDER_SECRET"
|
||||
NEXTAUTH_URL="http://localhost:3000"
|
||||
@ -129,7 +130,7 @@ After=network.target hoarder-workers.service
|
||||
[Service]
|
||||
ExecStart=pnpm start
|
||||
WorkingDirectory=/opt/hoarder/apps/web
|
||||
EnvironmentFile=/opt/hoarder/.env
|
||||
EnvironmentFile=/etc/hoarder/hoarder.env
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
@ -159,7 +160,7 @@ After=network.target hoarder-browser.service meilisearch.service
|
||||
[Service]
|
||||
ExecStart=pnpm start:prod
|
||||
WorkingDirectory=/opt/hoarder/apps/workers
|
||||
EnvironmentFile=/opt/hoarder/.env
|
||||
EnvironmentFile=/etc/hoarder/hoarder.env
|
||||
Restart=always
|
||||
TimeoutStopSec=5
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user