Wherein I set up a little website, and learn a bunch of stuff as I go.
- UV for all Python project management
- Just as a command runner
- OpenTofu for DevOps
- Postgres for the database
- Docker for local development
- On a Mac:
brew install colima docker
just tofu workspace select dev
just tofu apply
This will spin up a box on DigitalOcean using the settings defined in
infra/variables.tf, and create a DNS A record at
(workspace).for.(tld), (i.e. dev.for.hpk.io) pointing to the box. The variables
do_token
and ssh_fingerprint
should be defined in
infra/secrets.tfvars. Workspace-specific variables are
defined in infra/envs/(workspace).tfvars; e.g.
infra/envs/dev.tfvars defines the 'tags' list for the
box as [development]
and sets cloud_init_config
to point to the
cloud-init script
config/cloud-init-dev.yml.
The development cloud-init script will:
- Install the system packages
just
,zsh
,gunicorn
, andtree
- Create a 'wagtail' user, with UID 1500
- Create the 'ada' user, and:
- install their SSH public keys,
- install their dotfiles,
- add them to the 'sudo' and 'wagtail' groups
- Install Node on the system, from the
TF_VAR_NODE_VERSION
defined in .env - Checkout this repository into
/app
, setting the owner and group to 'wagtail'.