@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/docs/reference/config.md
CHANGED
|
@@ -10,7 +10,7 @@ Complete annotated schema for `epd.yml`.
|
|
|
10
10
|
# ==============================================================================
|
|
11
11
|
# Global Application Settings
|
|
12
12
|
# ==============================================================================
|
|
13
|
-
name: myapp # App name (
|
|
13
|
+
name: myapp # App name (see Names below)
|
|
14
14
|
mode: docker # Runtime mode: "docker" | "process"
|
|
15
15
|
|
|
16
16
|
# ==============================================================================
|
|
@@ -20,7 +20,7 @@ image: ghcr.io/org/myapp # Docker image repository
|
|
|
20
20
|
registry: # Optional: Container registry credentials
|
|
21
21
|
server: ghcr.io
|
|
22
22
|
username: deployer
|
|
23
|
-
password: ${GITHUB_TOKEN}
|
|
23
|
+
password: GITHUB_TOKEN # Name of the env var holding the token (${GITHUB_TOKEN} and [GITHUB_TOKEN] also work); a literal token is rejected
|
|
24
24
|
|
|
25
25
|
build:
|
|
26
26
|
dockerfile: Dockerfile # Relative path to Dockerfile (default: Dockerfile)
|
|
@@ -45,6 +45,17 @@ process:
|
|
|
45
45
|
- "dist"
|
|
46
46
|
source: rsync # Source transport: "rsync" | "git"
|
|
47
47
|
|
|
48
|
+
# ==============================================================================
|
|
49
|
+
# Host Baseline (Debian/Ubuntu with systemd; applied by epd setup)
|
|
50
|
+
# ==============================================================================
|
|
51
|
+
server:
|
|
52
|
+
auto_updates: true # Unattended security updates
|
|
53
|
+
firewall: true # EPD nftables table, includes Docker DNAT filtering
|
|
54
|
+
allow: [] # Additional public TCP ports, e.g. [8443]
|
|
55
|
+
ssh_hardening: true # Key login only; verify a fresh connection
|
|
56
|
+
log_rotation: true # Docker json-file: 10m per file, 3 files
|
|
57
|
+
reboot_window: "03:00" # Server local time; false disables automatic reboot
|
|
58
|
+
|
|
48
59
|
# ==============================================================================
|
|
49
60
|
# SSH Connection Details
|
|
50
61
|
# ==============================================================================
|
|
@@ -71,7 +82,7 @@ servers:
|
|
|
71
82
|
- deploy@203.0.113.11 # Per-host ssh login, overrides ssh.user
|
|
72
83
|
- hetzner:prod-web-1 # Dynamic Hetzner query by server name
|
|
73
84
|
- hetzner:label:app=web # Dynamic Hetzner query by label selector
|
|
74
|
-
replicas: 2 #
|
|
85
|
+
replicas: 2 # Container replicas per host (1-256; see Limits)
|
|
75
86
|
port: 3000 # Internal port the app listens on
|
|
76
87
|
domains: [myapp.com] # Public domains (automatic SSL)
|
|
77
88
|
cpus: "2.0" # Docker CPU limit
|
|
@@ -178,6 +189,49 @@ hooks:
|
|
|
178
189
|
# General Strategy & Retention
|
|
179
190
|
# ==============================================================================
|
|
180
191
|
strategy: rolling # Rollout strategy: "rolling" | "parallel"
|
|
181
|
-
keep_releases: 5 #
|
|
192
|
+
keep_releases: 5 # Past images / releases to retain (1-1000)
|
|
182
193
|
remote_root: /var/lib/epd # Root directory on remote hosts
|
|
183
194
|
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Limits and Rules
|
|
199
|
+
|
|
200
|
+
epd checks these when it loads `epd.yml`. An error names the file that sets the
|
|
201
|
+
offending key and the key path, for example `epd.staging.yml: servers.web.replicas`.
|
|
202
|
+
Overlay files (`epd.<destination>.yml`) are checked the same way.
|
|
203
|
+
|
|
204
|
+
**Names.** App, service and accessory names are 1-63 characters: lowercase letters,
|
|
205
|
+
digits, dashes and underscores, starting with a letter or digit. Upper-case names are
|
|
206
|
+
rejected. The name becomes container and state names on the server, so renaming an
|
|
207
|
+
app creates a new app there.
|
|
208
|
+
|
|
209
|
+
**Host names.** A route host is a DNS name, optionally `*.` wildcard, optionally with
|
|
210
|
+
one trailing dot (`example.com.`), or an IPv4 address, or a bracketed IPv6 literal
|
|
211
|
+
such as `"[2001:db8::1]"`. A route host may add `:port` (1-65535). Server hosts take
|
|
212
|
+
IPv4 or plain IPv6 addresses, and may take a `user@` prefix.
|
|
213
|
+
|
|
214
|
+
**Ports.** Service, route, health check, accessory, `ssh.port` and proxy entrypoint
|
|
215
|
+
ports are whole numbers from 1 to 65535. `host_port` is 1 to 65504, which leaves room
|
|
216
|
+
for the replica ports after it. `port_base` is 1 to 65280, because each app reserves
|
|
217
|
+
256 consecutive ports from it.
|
|
218
|
+
|
|
219
|
+
**Replicas.** `replicas` is a whole number from 1 to 256 per server. When host ports
|
|
220
|
+
are published (`mode: process`, `proxy.cross_host: true`, or `proxy.enabled: false`),
|
|
221
|
+
a service may have at most 16 replicas per server.
|
|
222
|
+
|
|
223
|
+
**Retention.** `keep_releases` is a whole number from 1 to 1000.
|
|
224
|
+
|
|
225
|
+
**Paths.** A route `path` and a health check `path` start with `/`. They must not
|
|
226
|
+
contain spaces, quotes, backticks, backslashes, control characters or `..` segments.
|
|
227
|
+
`remote_root` is an absolute path with no `..` segments or control characters.
|
|
228
|
+
|
|
229
|
+
**Environment variables.** Variable names are letters, digits and underscores, and do
|
|
230
|
+
not start with a digit. This applies to `env.clear` and `env.secret` keys, accessory
|
|
231
|
+
`env`, `proxy.dns_env`, `build.args` keys and `build.secrets` values. Values in
|
|
232
|
+
`env.clear` must not contain newlines, because each variable is one line in the env
|
|
233
|
+
file. Wherever a mapping is accepted for `env`, a list of `KEY=value` strings is also
|
|
234
|
+
accepted, and the same checks apply.
|
|
235
|
+
|
|
236
|
+
See [What epd setup installs](../guide/server-baseline.md) for recovery behavior,
|
|
237
|
+
shared-server settings, and when Docker log limits take effect.
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabioplunser/epd",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "Easy Project Deployer
|
|
3
|
+
"version": "0.5.16",
|
|
4
|
+
"description": "Easy Project Deployer \u2014 deploy any project to one or many servers with Docker or PM2, fronted by Traefik.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"author": "Fabio
|
|
6
|
+
"author": "Fabio Pl\u00fcnser",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://epd.peppi.dev",
|
|
9
9
|
"repository": {
|
|
@@ -49,17 +49,28 @@
|
|
|
49
49
|
"test": "bun test",
|
|
50
50
|
"web:dev": "cd apps/web && bun run dev",
|
|
51
51
|
"web:build": "cd apps/web && bun run build",
|
|
52
|
+
"web:build:verify": "bun run test/web-e2e/verify-build.ts",
|
|
53
|
+
"web:bundles": "bun run scripts/dashboard-bundles.ts",
|
|
52
54
|
"docs:dev": "vitepress dev docs",
|
|
53
55
|
"docs:build": "vitepress build docs",
|
|
54
56
|
"docs:preview": "vitepress preview docs",
|
|
55
|
-
"prepublishOnly": "bun run typecheck && bun test && bun run build:bundle"
|
|
57
|
+
"prepublishOnly": "bun run typecheck && bun test && bun run build:bundle",
|
|
58
|
+
"web:check": "cd apps/web && bun run check",
|
|
59
|
+
"web:test": "bun test apps/web/src/lib/ops apps/web/src/lib/server",
|
|
60
|
+
"web:test:linux": "bun test test/web-e2e",
|
|
61
|
+
"web:test:e2e": "bash test/web-e2e/run.sh",
|
|
62
|
+
"dashboard:up": "bun run scripts/container.ts compose up -d --build",
|
|
63
|
+
"dashboard:down": "bun run scripts/container.ts compose down"
|
|
56
64
|
},
|
|
57
65
|
"engines": {
|
|
58
66
|
"bun": ">=1.1.0"
|
|
59
67
|
},
|
|
60
68
|
"devDependencies": {
|
|
61
|
-
"@types/bun": "^1.4.
|
|
62
|
-
"typescript": "^
|
|
69
|
+
"@types/bun": "^1.4.2",
|
|
70
|
+
"typescript": "^6.0.3",
|
|
63
71
|
"vitepress": "^1.6.4"
|
|
72
|
+
},
|
|
73
|
+
"patchedDependencies": {
|
|
74
|
+
"@sveltejs/adapter-node@6.0.0": "apps/web/patches/@sveltejs%2Fadapter-node@6.0.0.patch"
|
|
64
75
|
}
|
|
65
76
|
}
|