Improved installer

This commit is contained in:
2026-02-14 15:25:53 +01:00
parent 50740e7e6c
commit dc53a05aee
+10 -7
View File
@@ -59,6 +59,9 @@ npm run build
# Create systemd service
SERVICE_FILE="/etc/systemd/system/dockship.service"
INSTALL_DIR=$(pwd)
NODE_PATH=$(which node)
USER_NAME=$(whoami)
echo ""
echo "Creating systemd service at $SERVICE_FILE..."
@@ -69,15 +72,15 @@ After=network.target
[Service]
Type=simple
WorkingDirectory=$(pwd)
# Use Node directly to run Next.js standalone server
ExecStart=$(which node) .next/standalone/server.js
WorkingDirectory=$INSTALL_DIR
# Run Next.js normally (non-standalone)
ExecStart=$(which npm) run start
Restart=always
RestartSec=5
EnvironmentFile=$(pwd)/.env
Environment=PATH=$(dirname $(which node)):/usr/bin:/bin
User=$(whoami)
Group=$(whoami)
EnvironmentFile=$INSTALL_DIR/.env
Environment=PATH=$(dirname $NODE_PATH):/usr/bin:/bin
User=$USER_NAME
Group=$USER_NAME
[Install]
WantedBy=multi-user.target