Archon/deploy
DIY Smart Code 5b79ca65ff deploy: harden cloud-init with archon user, swap, and fixes (#981)
* deploy: harden cloud-init with archon user, swap, and fixes

- Create dedicated 'archon' user (sudo + docker groups, passwordless
  sudo, locked password) and copy SSH authorized_keys from default
  cloud user (with root fallback) so login works immediately.
- Run docker pulls and the image build as the archon user via sudo -u.
- Add 2GB swapfile to prevent OOM during docker build on small VPS
  (<2GB RAM).
- Remove package_upgrade to speed up boot and avoid surprise kernel
  updates.
- Drop redundant systemctl enable/start docker (get.docker.com handles
  it).
- ufw allow 443/tcp for consistency with 22/80.
- set -e before clone for fail-fast on network errors.
- Update docs link to https://archon.diy/deployment/docker/.
- SETUP_COMPLETE now instructs ssh archon@<server-ip>.
- Header lists supported providers (incl. Hostinger) and notes the
  archon user + swap behavior.

* deploy: address PR review feedback on cloud-init

- Fix set -e regression: merge clone/cp/chown into single shell block
  so fail-fast actually applies (CodeRabbit).
- Drop passwordless sudo from archon user — docker group only. Removes
  trivial privilege escalation path (Wirasm).
- Remove non-existent 'docker' group from initial users.groups list;
  it is added via usermod later (CodeRabbit).
- Restore package_upgrade: true to patch CVEs in the base image before
  anything else runs (Wirasm).
- Add ufw allow 443/udp for HTTP/3 QUIC — Caddy exposes 443:443/udp in
  docker-compose (CodeRabbit).
- Update SETUP_COMPLETE and header comment to note archon user has no
  sudo (use default cloud user / root for maintenance).
2026-04-08 12:38:27 +03:00
..
.env.example feat(docker): complete Docker deployment setup (#756) 2026-03-26 15:02:04 +02:00
cloud-init.yml deploy: harden cloud-init with archon user, swap, and fixes (#981) 2026-04-08 12:38:27 +03:00
docker-compose.override.example.yml feat(config): add user-extensible Docker customization templates 2026-04-06 15:26:43 +03:00
docker-compose.yml feat: prepare for open-source migration to coleam00/Archon 2026-04-04 10:47:22 -05:00
Dockerfile.user.example chore: fix remaining references and update README for open-source launch 2026-04-07 08:03:13 -05:00