The front door for codewheel.ca. It runs Caddy, which handles HTTPS for every site on the
server, and serves the plain landing page in site/.
| Address | Serves |
|---|---|
codewheel.ca |
site/index.html |
www.codewheel.ca |
redirect to codewheel.ca |
firesight.codewheel.ca |
Firesight |
Each project runs from its own repo with its own compose file. Projects join the shared
codewheel Docker network so Caddy can forward requests to them. Why it's set up this way:
Firesight ADR 010.
With Docker installed:
docker network create codewheel # once per server
git clone https://github.com/pauljettedev/codewheel.git
cd codewheel
docker compose up -dThen deploy each project from its own repo.
cd ~/codewheel
git pull
docker compose up -d # applies changes to docker-compose.yml
docker compose restart caddy # reloads the CaddyfileThe restart is needed because the Caddyfile is mounted as a single file, and a running
container keeps reading the old copy until it restarts. Changes to site/ show up straight
away.
- Add a DNS A record for
<name>.codewheel.capointing at the server. - In the project's compose file, give the web container a unique
container_nameand add it to thecodewheelnetwork asexternal: true. Don't publish any ports. - Add a block to the
Caddyfile:<name>.codewheel.ca { reverse_proxy <container_name>:<port> } - Add a card for it to
site/index.html. - Update the server as above.