Skip to content

Comments

Claude/GitHub linode deployment#3

Merged
exploded merged 2 commits intomasterfrom
claude/github-linode-deployment-tSEGu
Feb 22, 2026
Merged

Claude/GitHub linode deployment#3
exploded merged 2 commits intomasterfrom
claude/github-linode-deployment-tSEGu

Conversation

@exploded
Copy link
Owner

No description provided.

Three root causes addressed:

1. Service never started: workflow did not ship moon.service, so
   systemd had no unit to enable/reload. Now moon.service is included
   in the SCP upload and installed to /etc/systemd/system/ on every
   deploy, followed by daemon-reload + enable.

2. Missing environment file: /usr/local/bin/moon-env is required by the
   service EnvironmentFile directive. If absent systemd refuses to
   start. The server-side script now creates a placeholder on first run
   with a clear warning to set GOOGLE_MAPS_API_KEY.

3. Brittle inline sudo commands replaced by /usr/local/bin/deploy-moon:
   a single root-owned script installed by server-setup.sh. The sudoers
   entry shrinks to one line; the SSH step becomes a single call to
   sudo /usr/local/bin/deploy-moon. Also added proper failure output
   (systemctl status --lines=30) so future errors are visible in logs.

Also disabled actions/setup-go cache (cache: false) to fix the
intermittent tar exit-code-2 cache restore error.

https://claude.ai/code/session_01SvqeKxC2hJbDnDAViSJSDk
The installed moon.service on the server differs from the repo copy:
  ExecStart=/var/www/moon/moon  (not /usr/local/bin/moon)
  EnvironmentFile=/var/www/moon/.env  (not /usr/local/bin/moon-env)
  User=james  (not www-data)

Changes:
- deploy.yml: remove moon.service from SCP source — the installed
  service file is already correct and must not be overwritten
- deploy-moon script: install binary to /var/www/moon/moon and web
  assets to /var/www/moon/; read User/Group dynamically from
  'systemctl show moon' so no username is hardcoded
- deploy-moon script: do not create or modify .env — it already
  exists at /var/www/moon/.env with the real API key

https://claude.ai/code/session_01SvqeKxC2hJbDnDAViSJSDk
@exploded exploded merged commit 504328a into master Feb 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants