Using Caddy with env substitution supports multie services, secrets, and images.
4.8K
Use Caddy in a secure and simple way. Your configuration files can be shared freely without redaction. With secrets support, even your environment variable configurations can be shared safely.
.
├── services # Recommended storage for sub-services
├── site # Caddy static site
│ └── web
│ └── index.html
├── templates
│ └── Caddyfile.json.template # Caddy configuration template
├── .env.warp.example # Template substitution definitions
├── .modules # Caddy module definitions
├── compose.yaml # Container orchestration config
├── compose.override.yaml # Container override config - for sub-services
├── Dockerfile # Image generation config
├── HEALTHCHECK.md # Health check instructions
├── README.md
└── README-cn.md
Note: We use JSON configuration directly instead of Caddy's default, more concise Caddyfile. This is because the Caddyfile automatically generates redundant configurations when paired with L4 modules. More importantly, the Caddyfile only supports automatic certificate configuration for explicitly declared domain site blocks, whereas our configuration does not require such site blocks at all.
git clone https://github.com/Lanrenbang/caddy-services.git
You can also download the Releases archive.
.env.warp and modify the necessary content as needed.echo -n "some secret" | docker secret create <secret_name> -
echo -n "some secret" | podman secret create <secret_name> -
Or run
docker/podman secret create <secret_name>directly and enter the secret when prompted.
Note:
<secret_name>must match the entries in.env.warpandcompose.yaml.
docker compose up -d
podman compose up -d
This project is distributed under the terms of the LICENSE file.
Content type
Image
Digest
sha256:9d23d264a…
Size
19.5 MB
Last updated
5 days ago
docker pull lanrenbang/caddy-services