83 lines
2.6 KiB
Markdown
83 lines
2.6 KiB
Markdown
# KonCad
|
|
|
|
Web UI for managing an existing dockerized [Caddy](https://caddyserver.com/) instance. Parses the Caddyfile into structured sections — global options and per-site blocks — so you don't have to edit raw config files.
|
|
|
|
## Features
|
|
|
|
- **Structured editor** — separate panels for global options and each site block
|
|
- **Admin API check** — blocks editing if Caddy's admin API is unreachable on load
|
|
- **Admin API toggle** — one checkbox adds/removes `admin :2019` from global options
|
|
- **Upstream reachability check** — warns before deploy if any `reverse_proxy` target is unreachable, with option to deploy anyway
|
|
- **Atomic deploy** — posts config to Caddy's `/load` endpoint; bad configs are rejected without disrupting the running instance
|
|
|
|
## Requirements
|
|
|
|
- Docker + Docker Compose
|
|
- An existing Caddy container with the admin API enabled (`admin :2019` in global options)
|
|
- Both containers on the same Docker network
|
|
|
|
## Setup
|
|
|
|
### 1. Create a `docker-compose.yml`
|
|
|
|
```yaml
|
|
services:
|
|
koncad:
|
|
image: git.d4nn13.de/d4nn13/koncad:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:80"
|
|
volumes:
|
|
- koncad_data:/data
|
|
- /opt/caddy:/caddy:ro
|
|
environment:
|
|
CADDY_ADMIN_URL: http://caddy:2019
|
|
CADDYFILE_IMPORT: /caddy/Caddyfile
|
|
networks:
|
|
- caddy-network
|
|
|
|
volumes:
|
|
koncad_data:
|
|
|
|
networks:
|
|
caddy-network:
|
|
external: true
|
|
```
|
|
|
|
Adjust to match your environment:
|
|
|
|
| Setting | Description |
|
|
|---|---|
|
|
| `CADDY_ADMIN_URL` | URL of Caddy's admin API — use the container name as hostname |
|
|
| `CADDYFILE_IMPORT` | Path to your existing Caddyfile (read-only, used once on first boot) |
|
|
| `- /opt/caddy:/caddy:ro` | Adjust to wherever your Caddy config directory lives |
|
|
| `caddy-network` | Replace with your existing Caddy Docker network name |
|
|
|
|
### 2. Start
|
|
|
|
```bash
|
|
docker compose up -d
|
|
```
|
|
|
|
### Updating
|
|
|
|
```bash
|
|
docker compose pull && docker compose up -d
|
|
```
|
|
|
|
KonCad is available at `http://<host>:8080`.
|
|
|
|
On first load it imports your existing Caddyfile (read-only). After the first deploy, KonCad manages its own copy.
|
|
|
|
## Usage
|
|
|
|
| Action | Description |
|
|
|--------|-------------|
|
|
| **Global Options** panel | Edit top-level Caddy options (email, logging, etc.) |
|
|
| **Enable Admin API** checkbox | Adds/removes `admin :2019` from global options |
|
|
| **+ Add Site** | Creates a new site block |
|
|
| **Remove** (per site) | Deletes that site block |
|
|
| **Deploy** | Validates and applies config via Caddy's `/load` API; shows errors inline if rejected |
|
|
|
|
If any `reverse_proxy` upstream is unreachable at deploy time, a warning modal lists them — you can cancel or deploy anyway.
|