➡️ Server responsible to serve the Caddy UI and communicate with the Caddy server API
Please refer to the caddy-ui repository for end-user instructions.
This server is stateless and does the following:
It is written in Go in order to have a small static binary on a Docker Scratch image.
The repository contains:
Use the following command:
docker run -d -p 8000:8000/tcp qmcgaw/caddy-ui
You can also use docker-compose.yml with:
docker-compose up -d
You can update the image with docker pull qmcgaw/caddy-ui or use one of tags available
| Environment variable | Default | Description |
|---|---|---|
CADDY_API_ENDPOINT | http://localhost:2019 | Caddy server API endpoint address |
LOG_ENCODING | console | Logging format, can be json or console |
LOG_LEVEL | info | Logging level, can be debug, info, warning, error |
NODE_ID | -1 | Node ID for logger (-1 to disable) |
LISTENING_PORT | 8000 | Internal listening TCP port |
ROOT_URL | / | URL path, used if behind a reverse proxy |
TZ | America/Montreal | Timezone string |
Setup your environment
F1 and select Remote-Containers: Open Folder in Container...
Install Go dependencies with
go mod download
Install golangci-lint
You might want to use an editor such as Visual Studio Code with the Go extension. Working settings are already in .vscode/settings.json.
Commands available:
# Build the binary
go build cmd/app/main.go
# Test the code
go test ./...
# Lint the code
golangci-lint run
# Build the Docker image
docker build -o build ui
docker build -t qmcgaw/caddy-ui .
# Run the container
docker run -it --rm -p 8000:8000/tcp qmcgaw/caddy-ui
See Contributing for more information on how to contribute to this repository.
This repository is under an MIT license unless otherwise indicated
Content type
Image
Digest
Size
3.7 MB
Last updated
over 6 years ago
docker pull qmcgaw/caddy-ui