Add interactive one-line installer for server and client
Release rolling / release (push) Successful in 10m17s
Release rolling / release (push) Successful in 10m17s
scripts/install.sh auto-detects OS/arch, prompts for server vs client (or both), installs peardock-server under /opt with a systemd unit, and installs the desktop client for Linux/macOS from the rolling release.
This commit is contained in:
+18
-21
@@ -1,41 +1,38 @@
|
||||
[Unit]
|
||||
Description=peardock HyperDHT Docker control plane
|
||||
Documentation=https://github.com/holepunchto/peardock
|
||||
After=docker.service network-online.target
|
||||
Documentation=https://git.ssh.surf/snxraven/peardock
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
Requires=docker.service
|
||||
# Soft-depend on Docker (rootless / podman setups may not ship docker.service)
|
||||
Wants=docker.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/peardock
|
||||
ExecStart=/usr/bin/node server/server.js
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
# Standalone Bare binary (install.sh / rolling release)
|
||||
ExecStart=/opt/peardock/peardock-server
|
||||
# Source install alternative:
|
||||
# ExecStart=/usr/bin/node /opt/peardock/server/server.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
# Health: process must stay up; optional external check via scripts/healthcheck.js
|
||||
TimeoutStartSec=30
|
||||
TimeoutStopSec=30
|
||||
|
||||
# Security hardening (adjust paths as needed)
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
ProtectHome=read-only
|
||||
ReadWritePaths=/opt/peardock /var/run/docker.sock
|
||||
|
||||
# Environment
|
||||
Environment=NODE_ENV=production
|
||||
EnvironmentFile=-/opt/peardock/.env
|
||||
# Example production knobs (uncomment / set in .env):
|
||||
# Environment=PEARDOCK_DEFAULT_ROLE=operator
|
||||
# Environment=PEARDOCK_PEER_ALLOWLIST=1
|
||||
# Environment=PEARDOCK_BROWSE_ROOTS=/var/lib/docker/volumes
|
||||
# Environment=ENABLE_SWARM=0
|
||||
# Environment=ENABLE_PLUGINS=0
|
||||
|
||||
# Run as a dedicated user with docker group access
|
||||
User=peardock
|
||||
Group=docker
|
||||
SupplementaryGroups=docker
|
||||
|
||||
Environment=NODE_ENV=production
|
||||
EnvironmentFile=-/opt/peardock/.env
|
||||
# Example production knobs (prefer .env):
|
||||
# Environment=PEARDOCK_DEFAULT_ROLE=operator
|
||||
# Environment=PEARDOCK_PEER_ALLOWLIST=1
|
||||
# Environment=ENABLE_HOLESAIL=1
|
||||
|
||||
ReadWritePaths=/opt/peardock
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user