Commit Graph
19 Commits
Author SHA1 Message Date
raucao 3bf51f44d5 kredits-github: fix webhook path and restart on unit changes
Probot 14 changed its default webhook path from "/" (Probot 7) to
"/api/github/webhooks", but the GitHub App still POSTs to
https://kredits-github.kosmos.org/. Every delivery returned 404, so the
app never processed pull_request events and never created the Kredits
check run. Serve "/" again via WEBHOOK_PATH.

Chef's systemd_unit :create only runs daemon-reload and never restarts a
running unit, so the env change above would not have taken effect until
the next repo change or reboot. Manage the unit with :create/:enable and
restart it from a service resource that subscribes to unit changes.
Apply the same fix to the kosmos-hubot bot resource.
2026-10-29 18:51:34 +04:00
raucao 44f86d3f07 Serve kredits-github via openresty, on Node 22
Move kredits-github onto Node 22.23.4 and behind the openresty reverse proxy
on the proxy hosts, replacing its own nginx + the custom haproxy entry.

- pin Node 22.23.4; run the app with HOST=0.0.0.0 / NODE_ENV=production and
  open port 3000 to 10.1.1.0/24 so the proxy can reach it over ZeroTier
- create /opt/kredits-github owned by the deploy user before cloning
- add kredits-github::nginx_proxy (tls_cert_for + openresty_site, upstream
  from role:kredits_github) and register it in the openresty_proxy run list
- drop the app-node nginx recipe/template and its role entry
2026-10-28 18:22:21 +04:00
raucao 5bb1499371 Move Node services onto patched releases for the eMudhra CA incident
Bump Node to patched releases (mastodon/sockethub 24.22.1, RTL 22.23.4).
Force the pinned major's latest patch in kosmos-nodejs: nodejs_install only
selects the repo major and a bare `package nodejs` never upgrades an already
installed package.

For hosts stuck on Node 16 (no patched 16.x), run the services with
NODE_OPTIONS=--use-openssl-ca so they use the patched system trust store:
ipfs-pinner, kredits-github, hubot botka/hal8000, sockethub.
2026-10-28 18:22:20 +04:00
raucaoandgreg 0933e9caa0 Add IPv6 to all OpenResty sites
Co-authored-by: Greg Karékinian <greg@karekinian.com>
2026-02-12 17:05:14 +04:00
greg 54098a450c Replace application cookbook with git resource 2023-06-28 18:54:38 +02:00
Râu Cao 7a1be33b7a Make all nginx vhosts listen on IPv6 2023-04-04 15:10:23 +02:00
basti ddded6fbae Create new nodejs VM, move kredits-github to it 2021-01-05 11:30:31 +01:00
greg 5bb34554a7 The nginx_certbot_site resource does nothing in the dev environment
No need to check for the environment in recipes that use the resource

Closes #54
2019-05-03 10:55:02 +02:00
greg 2cf611279b Make the systemd unit for kredits-github not world readable
This way the environment variables are kept secret. Only root can read
`/proc/$ID/environ`
2019-04-23 14:12:55 +02:00
greg f5051d6352 Revert "Move the environment variables to an EnvironmentFile"
This reverts commit 79023a65f2.
2019-04-23 14:12:16 +02:00
greg ecf5870195 Only add the Let's Encrypt set up when not in the dev environment 2019-04-23 11:41:12 +02:00
greg 79023a65f2 Move the environment variables to an EnvironmentFile 2019-04-23 11:40:33 +02:00
greg fabbe398a2 Remove the nginx recipe inclusion and the dependency on nginx in the service
The nginx vhost should be set up after the app is deployed. The node app
doesn't need nginx to run
2019-04-23 11:28:23 +02:00
greg 1d0f66adc4 Remove an unused dependency on the firewall cookbook 2019-04-23 11:25:16 +02:00
greg 3b2a3bf3fa Replace reference to sockethub, remove comment that's not relevant 2019-04-23 10:33:31 +02:00
basti 2658b90c5b Set log level to info
Now that everything works, we don't need detailed output for every
GitHub payload anymore.
2019-04-20 09:34:37 +01:00
basti f26edab7ad Fix nginx template
It refused to accept connections when the header directive was before
the server_name one.
2019-04-20 09:25:27 +01:00
basti e62393e443 Update cookbook README 2019-04-19 18:52:44 +01:00
basti 1d98bf14fe Configure kosmos-github
closes #35
2019-04-19 18:45:13 +01:00