mirror of
https://github.com/Twigpine/node.git
synced 2026-11-09 13:31:25 -10:00
* feat(infra): optional private ECR repo for the node image create_ecr_repo = true provisions an ECR repository in-account and switches the instance to pull from it: the instance role gets AmazonEC2ContainerRegistryReadOnly and user-data configures amazon-ecr-credential-helper, so first-boot pulls and SSM upgrades authenticate via the role (no expiring login tokens). README documents the local build-and-push flow. Motivation: ghcr.io/gitlawb/node is not anonymously pullable (403), which left first boot unable to start the stack. Co-Authored-By: OpenClaude <[email protected]> * feat(infra): HTTPS via Caddy + production tier (RDS, alarms, S3 state) - domain_name: Caddy sidecar terminates TLS on 80/443 with auto-renewed Let's Encrypt certs (persisted on the data volume); public_url defaults to https://<domain>; SG opens 80/443 — matches the Fly nodes - use_rds: managed Postgres (db.t4g.micro, encrypted, 7-day PITR, deletion protection) replaces the in-container postgres; DB security group only admits the node instance - alert_email: SNS email alerts wired to CloudWatch alarms — external HTTPS /health via Route53 health check, EC2 status checks, CPU, RDS free storage - user-data grows the filesystem when the EBS volume is enlarged - terraform state moved to S3 (versioned, KMS-encrypted, public-blocked bucket) with lockfile locking (requires terraform >= 1.10) Co-Authored-By: OpenClaude <[email protected]> --------- Co-authored-by: OpenClaude <[email protected]>
infra/
Deployment configuration, organized by target — one subdirectory per platform.
infra/
├── fly/
│ └── fly.toml # Fly.io app config (gitlawb-node-test)
└── aws/ # Terraform: single EC2 + Docker (see aws/README.md)
Deploying to Fly.io
Run from the repo root so the Docker build context includes crates/,
Cargo.toml, and bootstrap-peers.json:
fly deploy -c infra/fly/fly.toml
The dockerfile path inside fly.toml is resolved relative to the config
file, so it points to ../../Dockerfile.
Deploying to AWS
See aws/README.md — Terraform for a single EC2 instance
running the published ghcr.io/gitlawb/node image with Docker compose.
What intentionally stays at the repo root
Dockerfile/Dockerfile.bins— shared by the release CI workflow (.github/workflows/release.yml),scripts/build-bins.sh, and Fly builds.docker-compose.yml— local dev stack; bundled into the macOS app byscripts/build-macos-app.shand used for repo detection by the app.
Future targets should follow the same per-platform layout.