Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

codewheel

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.

Setting up a server

With Docker installed:

docker network create codewheel     # once per server
git clone https://github.com/pauljettedev/codewheel.git
cd codewheel
docker compose up -d

Then deploy each project from its own repo.

Updating

cd ~/codewheel
git pull
docker compose up -d           # applies changes to docker-compose.yml
docker compose restart caddy   # reloads the Caddyfile

The 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.

Adding a project

  1. Add a DNS A record for <name>.codewheel.ca pointing at the server.
  2. In the project's compose file, give the web container a unique container_name and add it to the codewheel network as external: true. Don't publish any ports.
  3. Add a block to the Caddyfile:
    <name>.codewheel.ca {
    	reverse_proxy <container_name>:<port>
    }
    
  4. Add a card for it to site/index.html.
  5. Update the server as above.

About

Caddy reverse proxy and landing page for codewheel.ca, which hosts my portfolio projects.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages