@fabioplunser/epd 0.5.14 → 0.5.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -8
- package/bin/epd.js +0 -0
- package/dist/cli.js +3163 -887
- package/docs/.vitepress/config.mts +2 -0
- package/docs/agents.md +16 -1
- package/docs/ci-cd.md +1 -1
- package/docs/guide/dashboard-validation.md +181 -0
- package/docs/guide/installation.md +12 -1
- package/docs/guide/private-repositories.md +44 -0
- package/docs/guide/secrets.md +26 -3
- package/docs/guide/server-baseline.md +104 -0
- package/docs/guide/storage-validation.md +40 -0
- package/docs/guide/troubleshooting.md +7 -3
- package/docs/reference/cli.md +99 -2
- package/docs/reference/config.md +58 -4
- package/package.json +17 -6
package/README.md
CHANGED
|
@@ -30,6 +30,36 @@ across every server's replicas, so one machine can serve while another is down.
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## Monorepo
|
|
34
|
+
|
|
35
|
+
The CLI lives in `src/` and `bin/`. `apps/web` is the single dashboard for deployments, servers, CrowdSec, metrics, logs and notifications. The former CrowdSecUI application is merged into this dashboard.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bun install --frozen-lockfile
|
|
39
|
+
bun run web:dev
|
|
40
|
+
bun run web:check
|
|
41
|
+
bun run web:test
|
|
42
|
+
bun run web:build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
To self-host on a Linux server with Docker Compose and WireGuard support:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cp .env.example .env
|
|
49
|
+
# Set the values in .env before starting.
|
|
50
|
+
bun run dashboard:up
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Set `ORIGIN` to the HTTPS dashboard URL, `MONITOR_WG_ENDPOINT` to its public `hostname:51820`, and a strong `EPD_ADMIN_PASSWORD`. Generate separate persistent `EPD_SESSION_SECRET` and `UI_ENCRYPTION_KEY` values with `openssl rand -base64 32`. Allow incoming UDP 51820 and put port 3000 behind your HTTPS reverse proxy.
|
|
54
|
+
|
|
55
|
+
Open Servers, add a server, test its SSH connection, verify the fingerprint, then install and connect. The dashboard uses the EPD CLI for deployment preparation and installs CrowdSec, Alloy and Trivy. Agents stream telemetry directly over a private WireGuard tunnel. The CLI does not need to stay running.
|
|
56
|
+
|
|
57
|
+
Alloy collects the system journal, Docker output and standard files under `/var/log`. Add other application file paths during onboarding. Applications must write to a configured source to appear in Logs. VictoriaLogs stores searchable logs with a server label. VictoriaMetrics stores Prometheus-compatible metrics. SQLite stores dashboard metadata, with separate operations databases per organization. Raw logs do not use Turso or an ORM.
|
|
58
|
+
|
|
59
|
+
`LOG_RETENTION_DAYS` accepts integers from 1 to 30 and defaults to 30. The stack refuses values outside that range. VictoriaLogs removes expired daily storage partitions, so physical deletion follows its partition cleanup schedule. Retention is not a backup.
|
|
60
|
+
|
|
61
|
+
The dashboard includes server and source filters, refresh and JSON download. Activity keeps install and maintenance results for 30 days across restarts. Interrupted operations retain their output and are marked as failed for review. Topology shows configured server locations and project assignments. Trivy scans run weekly, and critical findings can trigger notifications. AI analysis is not enabled.
|
|
62
|
+
|
|
33
63
|
## Install
|
|
34
64
|
|
|
35
65
|
### Option 1: Zero-Dependency Standalone Installer (Recommended)
|
|
@@ -40,6 +70,15 @@ Installs the self-contained, pre-compiled standalone binary for Linux (`x64` / `
|
|
|
40
70
|
curl -fsSL https://raw.githubusercontent.com/FabioPlunser/epd/main/install.sh | bash
|
|
41
71
|
```
|
|
42
72
|
|
|
73
|
+
On Windows x64, install from PowerShell without administrator access:
|
|
74
|
+
|
|
75
|
+
```powershell
|
|
76
|
+
irm https://raw.githubusercontent.com/FabioPlunser/epd/main/install.ps1 | iex
|
|
77
|
+
epd --help
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The installer verifies the release SHA256 checksum and adds `%LOCALAPPDATA%\epd\bin` to your user PATH. Install Git for Windows for Git Bash shell hooks and transfers, plus the Windows OpenSSH client. Docker mode uses Docker Desktop with Linux containers. Process mode additionally requires `rsync` (use WSL2 if it is unavailable). Target servers and the self-hosted dashboard stack run on Linux.
|
|
81
|
+
|
|
43
82
|
### Option 2: Global CLI via Bun or NPM
|
|
44
83
|
|
|
45
84
|
```bash
|
|
@@ -65,9 +104,47 @@ git clone https://github.com/FabioPlunser/epd.git && cd epd && bun install
|
|
|
65
104
|
bun run build # compiles dist/cli.js and dist/epd
|
|
66
105
|
```
|
|
67
106
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
`
|
|
107
|
+
Source builds need Bun. Deployments need an SSH client. Container mode also needs
|
|
108
|
+
a running Docker, Podman or nerdctl engine on your machine. Process mode needs
|
|
109
|
+
`rsync` and works without a container engine.
|
|
110
|
+
|
|
111
|
+
Local image builds, image transfers, dashboard Compose commands, console test
|
|
112
|
+
scripts, and the dashboard SSH test runner select a running Docker, Podman or nerdctl
|
|
113
|
+
engine, in that order. OrbStack, Colima and Rancher Desktop can work through
|
|
114
|
+
their Docker-compatible CLI. Set `container_engine: podman` in `epd.yml`,
|
|
115
|
+
or use a custom Docker-compatible executable name or path. The environment
|
|
116
|
+
variable `EPD_CONTAINER_ENGINE` overrides YAML. When no engine works, a terminal
|
|
117
|
+
session asks for an executable. Scripts fail with setup instructions.
|
|
118
|
+
An explicit choice never silently falls back.
|
|
119
|
+
|
|
120
|
+
On macOS, start the Podman VM with `podman machine start`. Then run
|
|
121
|
+
`bun run dashboard:up` as usual. Podman Compose needs an installed Compose
|
|
122
|
+
provider such as `podman-compose`. Podman builds use the configured platform
|
|
123
|
+
and Docker image format so images can be loaded on Docker servers.
|
|
124
|
+
|
|
125
|
+
Run `epd init` or `edp init` in a terminal for the full configuration wizard.
|
|
126
|
+
It asks about the app, servers, container engine, SSH, TLS, build commands,
|
|
127
|
+
health checks, environment, resources and deployment settings. Optional advanced
|
|
128
|
+
sections accept JSON objects for services, routes, accessories and other options.
|
|
129
|
+
Use `--yes` with explicit flags for unattended setup. The CLI validates answers
|
|
130
|
+
before replacing an existing configuration. Replacing a file requires `--force`.
|
|
131
|
+
|
|
132
|
+
Run `epd agent` or `edp agent` to choose an installed Codex or Claude CLI for
|
|
133
|
+
assisted configuration. Use `--cli <executable>` for another AI CLI that accepts
|
|
134
|
+
a positional prompt. EPD passes its bundled setup guide and keeps the agent's
|
|
135
|
+
normal permissions. Install and sign in to the AI CLI separately.
|
|
136
|
+
|
|
137
|
+
`epd agent --guide` prints the guide, including in standalone installations.
|
|
138
|
+
`epd agent --write-guide EPD_AGENT.md` exports it for another agent to read and
|
|
139
|
+
refuses to overwrite an existing file. No AI account is needed to read the guide.
|
|
140
|
+
|
|
141
|
+
Remote servers still use Docker, including provisioning, container management,
|
|
142
|
+
and monitoring. Keep `mode: docker` in `epd.yml` when building locally with
|
|
143
|
+
Podman. The older `test/e2e/*.sh` suites share a Docker socket and still require
|
|
144
|
+
Docker. Privileged integration suites also need the kernel capabilities their
|
|
145
|
+
fixtures use, such as WireGuard and nested containers.
|
|
146
|
+
|
|
147
|
+
Target servers need SSH access. `epd setup` installs the required server software.
|
|
71
148
|
|
|
72
149
|
---
|
|
73
150
|
|
|
@@ -98,7 +175,26 @@ build → ship → start new replicas → health check → switch routes
|
|
|
98
175
|
3. Waits for every new replica to pass its health check. If any fails, the new
|
|
99
176
|
replicas are removed and the old version keeps serving. Nothing is switched.
|
|
100
177
|
4. Writes the routing file, waits for the proxy to pick it up, then retires the
|
|
101
|
-
old replicas after a drain period.
|
|
178
|
+
old replicas after a drain period. With `cross_host: true` every proxy is
|
|
179
|
+
synced to the new replicas first, so old replicas are only retired once no
|
|
180
|
+
proxy routes to them.
|
|
181
|
+
|
|
182
|
+
Once the routes point at the new version, a failure never stops it. epd saves
|
|
183
|
+
the new state (retrying if the write fails) and reports cleanup problems, such as
|
|
184
|
+
a failed image prune or an old replica that cannot be stopped, as warnings.
|
|
185
|
+
|
|
186
|
+
If the route switch fails, epd writes the old routes back and stops the new
|
|
187
|
+
replicas, and the saved state is unchanged. If that restore also fails, epd reads
|
|
188
|
+
the proxy's route file to see which version it routes to:
|
|
189
|
+
|
|
190
|
+
- Routes point at the new version: the new replicas are kept and the new state is
|
|
191
|
+
saved, as on a normal switch. The deploy reports the error.
|
|
192
|
+
- Routes point at the old version: the new replicas are stopped and nothing is
|
|
193
|
+
saved.
|
|
194
|
+
- Neither can be confirmed (the file is unreadable, or names both): both versions
|
|
195
|
+
keep running, nothing is saved or retired, and the deploy fails with the route
|
|
196
|
+
file to inspect on that server. Re-run `epd deploy` only after checking which
|
|
197
|
+
version that file routes to.
|
|
102
198
|
|
|
103
199
|
The old version is never stopped before the new one is proven and routed, which
|
|
104
200
|
is what makes the deploy zero-downtime. There is an end-to-end test that hammers
|
|
@@ -120,7 +216,7 @@ image: ghcr.io/me/blog # docker mode only
|
|
|
120
216
|
registry: # omit entirely to ship images over SSH instead
|
|
121
217
|
server: ghcr.io
|
|
122
218
|
username: me
|
|
123
|
-
password: ${GITHUB_TOKEN}
|
|
219
|
+
password: GITHUB_TOKEN # name of the env var holding the token (${GITHUB_TOKEN} also works). Never paste the token itself: epd rejects it
|
|
124
220
|
|
|
125
221
|
build:
|
|
126
222
|
dockerfile: Dockerfile
|
|
@@ -260,8 +356,9 @@ proxy:
|
|
|
260
356
|
|
|
261
357
|
`env.clear` is written into the config; `env.secret` lists variable *names*
|
|
262
358
|
whose values are read from your shell or a `.env` file at deploy time and
|
|
263
|
-
written to the server as a `0600` file. Secrets never end up in the repo
|
|
264
|
-
|
|
359
|
+
written to the server as a `0600` file. Secrets never end up in the repo or in
|
|
360
|
+
your shell history. On the server, each file is removed as soon as nothing reads
|
|
361
|
+
it any more; `docs/guide/secrets.md` lists which files stay and why.
|
|
265
362
|
|
|
266
363
|
`.env`, `.env.local` and `.env.<destination>` next to `epd.yml` are loaded
|
|
267
364
|
automatically. Real environment variables always win.
|
|
@@ -555,7 +652,7 @@ machines, use the DNS challenge.
|
|
|
555
652
|
**`ports NNNNN-NNNNN are already reserved`.** Two apps hashed to the same port
|
|
556
653
|
block. Set `port_base:` in one of them to any free multiple of 256.
|
|
557
654
|
|
|
558
|
-
**A deploy was interrupted and now everything is locked.** `epd lock release`.
|
|
655
|
+
**A deploy was interrupted and now everything is locked.** Run `epd lock status`: it flags a lock whose deploy process is gone or that has been held for over six hours. Once you are sure no deploy is running, `epd lock release`.
|
|
559
656
|
|
|
560
657
|
---
|
|
561
658
|
|
package/bin/epd.js
CHANGED
|
File without changes
|