@fabioplunser/epd 0.5.17 → 0.5.19

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 CHANGED
@@ -25,29 +25,50 @@ Multiple machines, load balancing and failover are first-class: replicas are
25
25
  balanced by Traefik, and with `cross_host: true` every server's proxy balances
26
26
  across every server's replicas, so one machine can serve while another is down.
27
27
 
28
- 📖 **Documentation Site:** [epd.peppi.dev](https://epd.peppi.dev)
29
- 📖 **User Manual & Full Reference:** [Complete Guide](docs/guide.md)
28
+ 📖 **Documentation Site:** [epddocs.peppi.dev](https://epddocs.peppi.dev)
29
+ 📖 **User Manual & Full Reference:** [Complete Guide](apps/docs/guide.md)
30
30
 
31
31
  ---
32
32
 
33
33
  ## Monorepo
34
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.
35
+ | Path | What it is | Develop |
36
+ |---|---|---|
37
+ | [`packages/cli`](packages/cli) | The `epd` CLI, published to npm as `@fabioplunser/epd` and as standalone binaries | `cd packages/cli && bun run start` |
38
+ | [`apps/dashboard`](apps/dashboard) | The self-hosted dashboard for deployments, servers, CrowdSec, metrics, logs and notifications. Its image bundles the CLI. | `cd apps/dashboard && bun run dev` |
39
+ | [`apps/docs`](apps/docs) | The VitePress documentation site, hosted through EPD | `cd apps/docs && bun run dev` |
40
+
41
+ Use Bun 1.4.2, as specified in `.bun-version` and `package.json`. Run one install from the repository root. Each workspace has its own build and development commands. CI checks affected workspaces, including the dashboard when the CLI it bundles changes. CLI releases use `v*` tags.
36
42
 
37
43
  ```bash
38
44
  bun install --frozen-lockfile
39
- bun run web:dev
40
- bun run web:check
41
- bun run web:test
42
- bun run web:build
45
+ bun run cli:test # or cli:typecheck, cli:build
46
+ bun run dashboard:dev # or dashboard:check, dashboard:test, dashboard:build
47
+ bun run docs:dev
48
+ bun run check # CLI types and dashboard diagnostics
49
+ bun run test # CLI and dashboard unit tests
50
+ bun run build # CLI, dashboard and docs production builds
51
+ ```
52
+
53
+ Run the CLI from the repository root so it finds this checkout's `epd.yml` and `.env`:
54
+
55
+ ```bash
56
+ bun run cli --help
57
+ bun run deploy --dry-run
58
+ bun run deploy
43
59
  ```
44
60
 
61
+ The checked-in deployment targets `edp.peppi.dev` on peppi.dev. Its secrets stay in the ignored root `.env`. The deployment hooks connect the dashboard to the existing monitoring stack and stop the old Compose dashboard after health checks pass. On macOS, start the local container VM with `podman machine start` before building or deploying.
62
+
63
+ Deploy the docs separately with `bun run docs:deploy`. The root `epd.docs.yml` builds `apps/docs/Dockerfile` and serves the site at `https://epddocs.peppi.dev`. It uses the existing Caddy proxy, loopback ports 8600 and 8616 for blue/green deployments, and `CLOUDFLARE_API_TOKEN` from the root `.env` for DNS. The static server supports direct links to VitePress pages and returns HTTP 404 for missing pages. This deployment does not require GitHub Pages. The Pages workflow remains available as a separate publishing option.
64
+
45
65
  To self-host on a Linux server with Docker Compose and WireGuard support:
46
66
 
47
67
  ```bash
68
+ cd apps/dashboard
48
69
  cp .env.example .env
49
70
  # Set the values in .env before starting.
50
- bun run dashboard:up
71
+ bun run up
51
72
  ```
52
73
 
53
74
  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.
@@ -101,7 +122,7 @@ Standalone binaries are also downloadable directly from [GitHub Releases](https:
101
122
 
102
123
  ```bash
103
124
  git clone https://github.com/FabioPlunser/epd.git && cd epd && bun install
104
- bun run build # compiles dist/cli.js and dist/epd
125
+ bun run cli:build # compiles packages/cli/dist/cli.js and packages/cli/dist/epd
105
126
  ```
106
127
 
107
128
  Source builds need Bun. Deployments need an SSH client. Container mode also needs
@@ -140,7 +161,7 @@ refuses to overwrite an existing file. No AI account is needed to read the guide
140
161
 
141
162
  Remote servers still use Docker, including provisioning, container management,
142
163
  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
164
+ Podman. The older `packages/cli/test/e2e/*.sh` suites share a Docker socket and still require
144
165
  Docker. Privileged integration suites also need the kernel capabilities their
145
166
  fixtures use, such as WireGuard and nested containers.
146
167
 
@@ -574,7 +595,7 @@ Generate this workflow file automatically when creating your project:
574
595
  epd init --ci
575
596
  ```
576
597
 
577
- For detailed guides on setting up SSH deploy keys, using GitHub Container Registry (`ghcr.io`), or multi-environment deployments, see the [GitHub Actions CI/CD Guide](https://epd.peppi.dev/ci-cd).
598
+ For detailed guides on setting up SSH deploy keys, using GitHub Container Registry (`ghcr.io`), or multi-environment deployments, see the [GitHub Actions CI/CD Guide](https://epddocs.peppi.dev/ci-cd).
578
599
 
579
600
  ---
580
601
 
@@ -603,6 +624,8 @@ For detailed guides on setting up SSH deploy keys, using GitHub Container Regist
603
624
 
604
625
  Global flags: `-c/--config`, `-d/--destination`, `-v/--verbose`.
605
626
 
627
+ Without `--config`, EPD checks the current directory and parents, then searches the Git project tree for a config such as `deploy/epd.yml`. Outside Git, it searches the current subtree. Dependency folders, build output and nested repositories are excluded from the tree search. If several directories contain configs, choose one with `epd deploy --config deploy/docs/epd.yml`. Relative paths and `.env` files use the config's directory. See [config discovery](apps/docs/reference/cli.md#config-discovery).
628
+
606
629
  ### Generating the docker command
607
630
 
608
631
  ```bash
@@ -659,9 +682,9 @@ block. Set `port_base:` in one of them to any free multiple of 256.
659
682
  ## Tests
660
683
 
661
684
  ```bash
662
- bun test # config, routing, port allocation, health probes
663
- ./test/e2e/run.sh # real deploy over ssh: docker mode, two apps, rollback
664
- ./test/e2e/process.sh # real deploy over ssh: process mode, pm2, no docker
685
+ bun run cli:test # config, routing, port allocation, health probes
686
+ ./packages/cli/test/e2e/run.sh # real deploy over ssh: docker mode, two apps, rollback
687
+ ./packages/cli/test/e2e/process.sh # real deploy over ssh: process mode, pm2, no docker
665
688
  ```
666
689
 
667
690
  The end-to-end tests build a throwaway "server" container running sshd and
package/bin/epd.js CHANGED
File without changes