Skip to main content

Deployment

Four things deploy independently. There is no CI — every one of these is run by hand from a laptop. CodeCommit is gone; GitHub is the only remote.

All of them call ~/cred_helpers/creds_get.sh first, because AWS credentials live gpg-encrypted at ~/.aws/credentials.gpg. If a deploy fails with "Unable to locate credentials", that's the missing step.

Site (docusaurus-prod)

cd docusaurus-prod
npm run build
./DEPLOY_ONLY.sh

Empties s3://thomasrones.com and uploads ./build. Note it's a wipe then upload, not a sync — the bucket is briefly empty mid-deploy.

progress.md in this folder is regenerated as part of the build. It's the one page here that's never manually edited.

Admin frontend

cd admin-frontend
./build_and_deploy.sh # npm run build, then DEPLOY_ONLY.sh

Deploys to s3://thomasrones.com/admin/. Same bucket as the site, under a prefix. Deployed and intentionally minimal.

Backend

cd main-backend
./scripts/deploy.sh

Cross-compiles GOOS=linux GOARCH=amd64 from ./cmd/api/, scps the binary and migrations to the thomasrones host (see ~/.ssh/config), and restarts the trones-noters-api systemd service. Path on the box: /home/ubuntu/trones-noters-api.

Migrations are transferred but not applied automatically — run them against RDS yourself. See deploy.md at the repo root for the psql invocation and the VPC whitelist step.

Marketing CDN

aws cloudformation deploy \
--template-file marketing-cdn.yaml \
--stack-name marketing-cdn \
--region us-east-1 \
--parameter-overrides BucketName=trones-marketing \
--capabilities CAPABILITY_IAM

Separate stack from IaaS.yaml on purpose — it holds social/marketing assets for every project and has no dependency on the portfolio VPC. Full notes in marketing-cdn.md.

Infrastructure

IaaS.yaml at the repo root is the CloudFormation template for the portfolio VPC, subnets, EC2, RDS and the portfolio-site-static bucket + distribution. It is not redeployed routinely.

Worth fixing eventually

  • No CI. Every deploy is a local command, so nothing is gated on tests.
  • The site deploy wipes the bucket before uploading rather than syncing.
  • Migrations are a manual step separated from the deploy that ships the code expecting them.

Comments

No comments yet. Be the first!