Commit Graph

36 Commits

Author SHA1 Message Date
timothykim 787e747fa4 fix deploy re-exec not forwarding command argument 2026-03-20 20:10:32 -04:00
timothykim a37872489c add certbot email, pin git pull to origin main 2026-03-20 19:57:45 -04:00
timothykim de1d60b1db remove standalone certbot fallback, fail on missing certs 2026-03-20 19:50:44 -04:00
timothykim c8c79a542a re-exec deploy.sh after git pull to pick up changes
Deploy nginx / deploy (push) Successful in 3s
Deploy nginx / test (push) Successful in 7s
2026-03-20 17:01:36 -04:00
timothykim 729eadee33 use *.*.conf glob to match only domain conf files for cert issuance 2026-03-20 16:55:52 -04:00
timothykim 4b39eaaf06 skip default server block in cert issuance, remove ssh debug lines 2026-03-20 16:53:47 -04:00
timothykim 2bcf67dcc4 fetch secrets by uuid instead of listing all 2026-03-20 15:51:43 -04:00
timothykim b19e194c0b remove deploy user from docker group 2026-03-20 15:38:11 -04:00
timothykim be1ad6b456 audit fixes: error handling, docs consistency, bucket idempotency
Provision server / provision (push) Successful in 12s
2026-03-20 11:28:36 -04:00
timothykim 76d01c66d6 fix deploy: use compose up instead of down+up, fetch secrets individually
Provision server / provision (push) Successful in 11s
- docker compose up -d --remove-orphans instead of down then up
- configure.sh delegates all service deployment to deploy.sh
- deploy.sh generates .env from bws before starting services
- remove 2>/dev/null from bws calls so errors are visible
2026-03-19 12:28:49 -04:00
timothykim 3a8fb09bcf add .env generation from bws, handle build services in deploy
Provision server / provision (push) Successful in 6s
- configure.sh generates .env files from .env.keys + bws
- deploy.sh detects build: services and runs docker compose build
- new-service.sh prints .env.keys instructions
- clean up .gitignore
2026-03-19 12:11:46 -04:00
timothykim 037b78734f move dev scripts to tools/, migrate to bws, use example.com in docs
Provision server / provision (push) Successful in 7s
- Move new-app.sh, new-service.sh, remove-app.sh from scripts/ to tools/
- Migrate new-app.sh and remove-app.sh from bw to bws
- Replace real domains with example.com in documentation and help text
2026-03-19 11:10:14 -04:00
timothykim 5a8d9a8aa0 install bws to /usr/bin instead of /usr/local/bin 2026-03-18 19:15:44 -04:00
timothykim ef7fe7677c migrate bootstrap.sh from bw to bws, update docs 2026-03-18 19:04:22 -04:00
timothykim 00ab7d1b8d auto-issue certs on nginx deploy, document one-domain-per-conf convention 2026-03-18 15:18:11 -04:00
timothykim 199ed98e7d make new scripts executable
Provision server / provision (push) Successful in 7s
2026-03-18 14:53:46 -04:00
timothykim 919c5353bc split setup.sh into bootstrap.sh and configure.sh
Provision server / provision (push) Failing after 2s
bootstrap.sh handles first-time setup (manual, Bitwarden).
configure.sh handles idempotent config (CI-safe).
Add provision workflow, deploy-garage workflow, new-service.sh.
Remove git-crypt references and empty .gitattributes.
2026-03-18 14:51:19 -04:00
timothykim 3b4ff1f291 fix dns record creation in new-app.sh 2026-03-16 22:38:57 -04:00
timothykim a45813db35 cache secrets to file, fix spinner animation 2026-03-16 22:06:47 -04:00
timothykim 98aa8e7727 use workflow dispatch api instead of deploy-trigger file 2026-03-16 21:54:19 -04:00
timothykim 0493910966 deploy: clean up old containers before starting new ones 2026-03-16 21:43:01 -04:00
timothykim 99a4a4b3ea cache bitwarden secrets in env vars to skip unlock on repeated runs 2026-03-16 21:22:53 -04:00
timothykim 7df77db7b3 fix new-app: retry build trigger, clean up temp nginx conf, add remove-app script 2026-03-16 21:07:34 -04:00
timothykim 8a30405d18 add hantim.net
Deploy hantim.net / deploy (push) Failing after 1s
Deploy nginx / deploy (push) Failing after 1s
2026-03-16 18:09:23 -04:00
timothykim 9a950524eb add cert command to deploy.sh, use deploy user for cert issuance
- deploy.sh: add cert-<domain> command for zero-downtime SSL issuance
- new-app.sh: SSH as deploy user with key from Bitwarden instead of personal user
- remove DEPLOY_USER/DEPLOY_HOST env var requirements
- update all docs to reflect new flow
2026-03-16 02:05:18 -04:00
timothykim b51fe596c6 automate new-app.sh: DNS, cert, commit, build, verify
- resolve server IP from hantim.net instead of env var
- create Vultr DNS zone and A records via API
- wait for DNS propagation before cert issuance
- issue SSL cert via webroot (zero downtime)
- auto commit and push hantim-server
- trigger initial app build via Gitea API
- verify site is live with curl check
- update all docs to reflect single-command flow
2026-03-16 01:57:10 -04:00
timothykim 5c38b0631a replace NPM with vanilla nginx + certbot
Deploy nginx / deploy (push) Failing after 3s
Deploy timothykim.net / deploy (push) Successful in 3s
- nginx:alpine replaces nginx-proxy-manager
- certbot on host with standalone issuance and auto-renewal
- per-site nginx configs in conf.d/ (HTTP->HTTPS, bare->www)
- container names use underscores (timothykim_net)
- setup.sh: automated cert issuance, dynamic app startup
- deploy.sh: nginx -t guard, graceful image-not-found
- new-app.sh: Gitea API repo creation, nginx conf generation
- add ARCHITECTURE.md, USECASES.md, CLAUDE.md
- remove old NPM data/certs from tracking
2026-03-16 00:55:13 -04:00
timothykim b96e94afa6 use vars.DEPLOY_HOST instead of secrets since hostname is not sensitive 2026-03-15 21:49:29 -04:00
timothykim 5dd2343d4a migrate to hantim org and consolidate deploy secret name
Deploy timothykim.net / deploy (push) Failing after 3s
- Update all references from timothykim/ to hantim/ org
- Rename DEPLOY_KEY to DEPLOY_SSH_KEY everywhere
- Update README to reference org-level secrets
2026-03-15 21:46:31 -04:00
timothykim eff589c3de switch deploy workflows from appleboy/ssh-action to raw ssh
appleboy/ssh-action's script parameter doesn't set
SSH_ORIGINAL_COMMAND, which deploy.sh needs. Using raw ssh
with the command as an argument works correctly.
2026-03-13 17:10:37 -04:00
timothykim c484109f1c merge dispatch and deploy into a single deploy.sh
deploy.sh reads SSH_ORIGINAL_COMMAND directly, validates it, and
runs the deploy. No more dispatch indirection.
2026-03-13 17:08:19 -04:00
timothykim 7d5f0920b7 replace per-app deploy scripts with generic deploy.sh
Dispatch now validates the command format and routes to a single
deploy.sh that handles any app. This fixes first-deploy failures
for new apps (dispatch no longer needs a static case list) and
simplifies new-app.sh (no deploy script or dispatch update needed).

Also adds input validation to new-app.sh, set -euo pipefail to
deploy scripts, and dnf module reset before nodejs install.
2026-03-13 17:00:59 -04:00
timothykim a3cb7680f3 use sudo for deploy scripts instead of chown on repo
The deploy user runs scripts as root via passwordless sudo,
avoiding ownership conflicts with Docker-mounted volumes.
2026-03-13 15:58:42 -04:00
timothykim 21162432b9 fix execute permissions on deploy scripts 2026-03-13 15:50:10 -04:00
timothykim 7a5de9be6d change repo path from /opt to /opt/hantim
/opt already exists on Linux systems and git clone refuses to clone
into a non-empty directory.
2026-03-13 11:52:51 -04:00
timothykim a3fb085fdb initial commit
Deploy nginx / deploy (push) Failing after 1s
Deploy timothykim.net / deploy (push) Failing after 1s
2026-03-12 21:16:59 -04:00