fix env file loading

This commit is contained in:
Marc Went 2026-01-01 20:56:56 +01:00
parent 5a987efb62
commit 0def93e9d8
No known key found for this signature in database
GPG Key ID: EA4208DC5ABEB135

View File

@ -28,14 +28,8 @@ LATEST_APP_VERSION=$(get_latest_github_release "cmintey/wishlist")
msg_info "Installing Wishlist" msg_info "Installing Wishlist"
cd /opt/wishlist cd /opt/wishlist
cat <<EOF >/opt/wishlist/.env cp .env.example .env
NODE_ENV=production echo "NODE_ENV=production" >> /opt/wishlist/.env
BODY_SIZE_LIMIT=5000000
ORIGIN="http://0.0.0.0:3280" # The URL your users will be connecting to
TOKEN_TIME=72 # hours until signup and password reset tokens expire
DEFAULT_CURRENCY=EUR
MAX_IMAGE_SIZE=5000000 # 5 megabytes
EOF
$STD pnpm install $STD pnpm install
$STD pnpm svelte-kit sync $STD pnpm svelte-kit sync
$STD pnpm prisma generate $STD pnpm prisma generate
@ -58,7 +52,8 @@ After=network.target
[Service] [Service]
WorkingDirectory=/opt/wishlist WorkingDirectory=/opt/wishlist
ExecStart=/usr/bin/env bash -c '[ -f /opt/wishlist/.env ] && { set -a; . /opt/wishlist/.env || true; set +a;}; ./entrypoint.sh' EnvironmentFile=/opt/wishlist/.env
ExecStart=/usr/bin/env sh -c './entrypoint.sh'
Restart=on-failure Restart=on-failure
[Install] [Install]