fix(slink): restart caddy after config write, add API_URL to client env
- apt auto-starts caddy with default config (port 80); systemctl enable --now is a no-op if already running, so new Caddyfile (:8080) was never loaded - client falls back to http://localhost:8080 without explicit API_URL; add API_URL=http://127.0.0.1:8080 to /etc/default/slink-client
This commit is contained in:
@@ -88,6 +88,7 @@ PORT=3000
|
||||
NODE_ENV=production
|
||||
BODY_SIZE_LIMIT=Infinity
|
||||
ORIGIN=http://${LOCAL_IP}:3000
|
||||
API_URL=http://127.0.0.1:8080
|
||||
EOF
|
||||
cat <<'EOF' >/etc/systemd/system/slink-client.service
|
||||
[Unit]
|
||||
@@ -106,7 +107,8 @@ RestartSec=5
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now redis-server php${PHP_VER}-fpm caddy slink-client
|
||||
systemctl enable -q --now redis-server php${PHP_VER}-fpm slink-client
|
||||
systemctl restart caddy
|
||||
{
|
||||
echo "Slink Credentials"
|
||||
echo "Admin Email: admin@slink.local"
|
||||
|
||||
Reference in New Issue
Block a user