Initial commit: caddy static file server workspace
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
30
caddy/CLAUDE.md
Normal file
30
caddy/CLAUDE.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## What this is
|
||||
|
||||
A Caddy static file server running in Docker Compose. It serves the `www/` directory at `:80` with directory browsing enabled. `www/` is a grab-bag of standalone, self-contained HTML pages (chart demos, QR/invoice scanners, Lit + Tailwind examples, a luopan compass, etc.) — there is no build step, bundler, or framework shared across them. Each `.html` file is opened directly by the browser; most pull their dependencies from CDNs inline.
|
||||
|
||||
## Commands
|
||||
|
||||
```sh
|
||||
./run.sh # docker-compose up -d (start the server)
|
||||
./stop.sh # docker-compose down
|
||||
./list_docker_compose_services.sh # docker-compose ps
|
||||
./view-output-from-containers.sh # docker-compose logs -f
|
||||
./enter_caddy_container.sh # shell into the running container
|
||||
```
|
||||
|
||||
After editing the `Caddyfile`, restart with `./stop.sh && ./run.sh` (the file is bind-mounted, not hot-reloaded). HTML files under `www/` are bind-mounted live — just refresh the browser.
|
||||
|
||||
## Layout
|
||||
|
||||
- `Caddyfile` — server config. Mounted to `/etc/caddy/Caddyfile`. Currently serves `/var/www/static` with `file_server browse` + gzip.
|
||||
- `docker-compose.yaml` — single `caddy` service, bind-mounts `./Caddyfile`, `./caddy_data` (certs/state), and `./www` → `/var/www/static`. Port 80. `TZ=Asia/Taipei`.
|
||||
- `www/` — served content. Add a new demo by dropping a `.html` file (and any asset subdir) here; it's immediately reachable at `http://localhost/<name>.html`.
|
||||
|
||||
## Notes
|
||||
|
||||
- Each HTML page stands alone. When editing one, don't assume shared CSS/JS with the others — check that file's own `<head>`.
|
||||
- `*.tar.gz` and `*_BACKUP_*` / `*.ORIG-BACKUP_*` files in the repo are snapshots/backups, not live content.
|
||||
Reference in New Issue
Block a user