Developer Environment Dependencies

  • Go (see go.mod for go dependencies)
  • Docker
    • Marp runs in container
    • Caddy runs in container
  • Sqlc CLI
  • Task CLI
  • Templ CLI
  • Goose (for db migrations)
  • Tailwind
  • Typescript
  • Hugo stuff

Production Environment Dependencies

  • Docker
  • Bash
  • Task CLI

VS Code extensions used

Workflows

Run in development (local)

task run-dev

Builds app binary and mounts as volume, runs all services with docker compose:

  • caddy
  • marp
  • echo app

To quickly regenerate templates and rebuild go code during development use:

task restart-echo

To run migrations on development database (already included in production script):

task migrate

Deploy

task deploy
  • builds images
  • pushes them to docker hub
  • copies all scripts and env to remote server
  • starts ssh session

Run in production (remote, after deploy)

task run-prod
  • pulls the latest images (caddy, marp, and app (includes migration))
  • runs the migration binary as a separate container
  • starts caddy, marp, and the app (’echo’) servers.