Small installer patches

This commit is contained in:
2026-01-04 00:06:13 +01:00
parent 9aa9f63c4c
commit 1cbd3e72c6
+14 -9
View File
@@ -13,7 +13,12 @@ echo "\x1b[0m\n\n"
echo "Welcome to the DockShip installer!"
# 2️⃣ Prompt for Lite Mode
if [ -f .env ]; then
echo "\x1b[31m'.env' file already exists\x1b[0m"
exit
fi
# Prompt for Lite Mode
read -p "Do you want to enable Lite Mode? (API only, no UI) [y/N]: " lite_mode
if [[ "$lite_mode" =~ ^([yY][eE][sS]|[yY])$ ]]; then
echo "DOCKSHIP_LITE=true" > .env
@@ -21,20 +26,20 @@ else
echo "DOCKSHIP_LITE=false" > .env
fi
# 3️⃣ Display GitHub OAuth info
# Display GitHub OAuth info
BASE_URL="http://localhost:3000"
REDIRECT_URL="$BASE_URL/api/auth/callback/github"
echo ""
echo "To integrate with GitHub, create a GitHub OAuth App here:"
echo " https://github.com/settings/developers"
echo " https://github.com/settings/applications/new"
echo ""
echo "Use the following URLs:"
echo " Base URL: $BASE_URL"
echo " Redirect URL: $REDIRECT_URL"
echo ""
# 4️⃣ Prompt for GitHub Client ID and Secret
# Prompt for GitHub Client ID and Secret
read -p "Enter your GitHub Client ID: " GITHUB_CLIENT_ID
read -p "Enter your GitHub Client Secret: " GITHUB_CLIENT_SECRET
@@ -42,17 +47,17 @@ read -p "Enter your GitHub Client Secret: " GITHUB_CLIENT_SECRET
echo "GITHUB_CLIENT_ID=$GITHUB_CLIENT_ID" >> .env
echo "GITHUB_CLIENT_SECRET=$GITHUB_CLIENT_SECRET" >> .env
# 5️⃣ Install dependencies
# Install dependencies
echo ""
echo "Installing npm dependencies..."
npm install
# 6️⃣ Build the app
# Build the app
echo ""
echo "Building DockShip..."
npm run build
# 7️⃣ Create systemd service
# Create systemd service
SERVICE_FILE="/etc/systemd/system/dockship.service"
echo ""
@@ -75,7 +80,7 @@ Group=$(whoami)
WantedBy=multi-user.target
EOL
# 8️⃣ Enable and start the service
# Enable and start the service
echo ""
echo "Enabling and starting DockShip service..."
sudo systemctl daemon-reload
@@ -83,7 +88,7 @@ sudo systemctl enable dockship
sudo systemctl start dockship
echo ""
echo "✅ DockShip installation complete!"
echo "DockShip installation complete!"
echo "You can check logs with: sudo journalctl -u dockship -f"
echo "Lite Mode: $(grep DOCKSHIP_LITE .env)"
echo "You can edit .env later to update configuration."