Caddy is an open-source web server and reverse proxy.
Caddy is configured via a Caddyfile.
Docs:
A Caddyfile is Caddy's configuration file. It defines which port Caddy listens on and where to forward requests.
Docs:
In this project, the Caddyfile is at caddy/Caddyfile.
This configuration:
- Reads the value of
CADDY_CONTAINER_PORTin.env.docker.secret. - Makes
Caddylisten on the port listen on this port inside aDockercontainer. - Serves frontend files
- Forwards requests to backend
Caddy serves static front-end files from /srv for all other paths. The try_files directive falls back to index.html for client-side routing.
Caddy routes API endpoints (/items*, /learners*, /interactions*, /docs*, /openapi.json) to the app service.
The port number (without < and >) which Caddy listens on.
The port number is the value of CADDY_HOST_PORT in .env.docker.secret.
Example: 42000.