@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 +37 -14
- package/bin/epd.js +0 -0
- package/dist/cli.js +363 -132
- package/package.json +15 -29
- package/docs/.vitepress/config.mts +0 -92
- package/docs/.vitepress/theme/DeployAnimation.vue +0 -989
- package/docs/.vitepress/theme/index.ts +0 -10
- package/docs/.vitepress/theme/style.css +0 -151
- package/docs/agents.md +0 -166
- package/docs/ci-cd.md +0 -152
- package/docs/getting-started.md +0 -296
- package/docs/guide/accessories.md +0 -103
- package/docs/guide/architecture.md +0 -94
- package/docs/guide/blue-green.md +0 -93
- package/docs/guide/dashboard-validation.md +0 -181
- package/docs/guide/deployment-modes.md +0 -135
- package/docs/guide/getting-started.md +0 -296
- package/docs/guide/high-availability.md +0 -89
- package/docs/guide/installation.md +0 -124
- package/docs/guide/multi-site.md +0 -101
- package/docs/guide/private-repositories.md +0 -44
- package/docs/guide/routing.md +0 -129
- package/docs/guide/secrets.md +0 -132
- package/docs/guide/server-baseline.md +0 -104
- package/docs/guide/storage-validation.md +0 -40
- package/docs/guide/troubleshooting.md +0 -113
- package/docs/guide.md +0 -150
- package/docs/hetzner-dns.md +0 -95
- package/docs/index.md +0 -44
- package/docs/public/CNAME +0 -1
- package/docs/public/favicon.svg +0 -52
- package/docs/public/llms-full.txt +0 -344
- package/docs/public/llms.txt +0 -43
- package/docs/reference/cli.md +0 -510
- package/docs/reference/config.md +0 -237
package/docs/reference/config.md
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# Configuration Reference (`epd.yml`)
|
|
2
|
-
|
|
3
|
-
Complete annotated schema for `epd.yml`.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Full Annotated Schema
|
|
8
|
-
|
|
9
|
-
```yaml
|
|
10
|
-
# ==============================================================================
|
|
11
|
-
# Global Application Settings
|
|
12
|
-
# ==============================================================================
|
|
13
|
-
name: myapp # App name (see Names below)
|
|
14
|
-
mode: docker # Runtime mode: "docker" | "process"
|
|
15
|
-
|
|
16
|
-
# ==============================================================================
|
|
17
|
-
# Docker Mode Settings (when mode: docker)
|
|
18
|
-
# ==============================================================================
|
|
19
|
-
image: ghcr.io/org/myapp # Docker image repository
|
|
20
|
-
registry: # Optional: Container registry credentials
|
|
21
|
-
server: ghcr.io
|
|
22
|
-
username: deployer
|
|
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
|
-
|
|
25
|
-
build:
|
|
26
|
-
dockerfile: Dockerfile # Relative path to Dockerfile (default: Dockerfile)
|
|
27
|
-
context: . # Build context directory (default: .)
|
|
28
|
-
platform: linux/amd64 # Target architecture
|
|
29
|
-
args: # Build arguments passed to docker build
|
|
30
|
-
COMMIT_SHA: ${GIT_SHA:-dev}
|
|
31
|
-
secrets: # BuildKit build secrets
|
|
32
|
-
npm_token: NPM_TOKEN
|
|
33
|
-
|
|
34
|
-
# ==============================================================================
|
|
35
|
-
# Process Mode Settings (when mode: process)
|
|
36
|
-
# ==============================================================================
|
|
37
|
-
process:
|
|
38
|
-
install: bun install # Dependency install command on server
|
|
39
|
-
build: bun run build # Build command on server
|
|
40
|
-
start: bun run start # Start command (epd automatically injects $PORT)
|
|
41
|
-
exclude: # Files excluded from rsync archive
|
|
42
|
-
- ".git"
|
|
43
|
-
- "node_modules"
|
|
44
|
-
- ".env"
|
|
45
|
-
- "dist"
|
|
46
|
-
source: rsync # Source transport: "rsync" | "git"
|
|
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
|
-
|
|
59
|
-
# ==============================================================================
|
|
60
|
-
# SSH Connection Details
|
|
61
|
-
# ==============================================================================
|
|
62
|
-
ssh:
|
|
63
|
-
user: root # SSH username (default: root)
|
|
64
|
-
# Any non-root user needs passwordless sudo.
|
|
65
|
-
# Override it per server by writing the login
|
|
66
|
-
# into the host entry: "deploy@203.0.113.10".
|
|
67
|
-
port: 22 # SSH port (default: 22)
|
|
68
|
-
key: ~/.ssh/id_ed25519 # Path to explicit private key
|
|
69
|
-
sudo_password: ${EPD_SUDO_PASSWORD} # Only if the user has no NOPASSWD rule;
|
|
70
|
-
# interactive runs simply prompt for it instead
|
|
71
|
-
proxy_jump: bastion.net # Optional jump host / bastion
|
|
72
|
-
options: # Extra OpenSSH options
|
|
73
|
-
- ServerAliveInterval=30
|
|
74
|
-
|
|
75
|
-
# ==============================================================================
|
|
76
|
-
# Server Groups & Service Definitions
|
|
77
|
-
# ==============================================================================
|
|
78
|
-
servers:
|
|
79
|
-
web:
|
|
80
|
-
hosts: # Target servers (IPs or Hetzner selectors)
|
|
81
|
-
- 203.0.113.10
|
|
82
|
-
- deploy@203.0.113.11 # Per-host ssh login, overrides ssh.user
|
|
83
|
-
- hetzner:prod-web-1 # Dynamic Hetzner query by server name
|
|
84
|
-
- hetzner:label:app=web # Dynamic Hetzner query by label selector
|
|
85
|
-
replicas: 2 # Container replicas per host (1-256; see Limits)
|
|
86
|
-
port: 3000 # Internal port the app listens on
|
|
87
|
-
domains: [myapp.com] # Public domains (automatic SSL)
|
|
88
|
-
cpus: "2.0" # Docker CPU limit
|
|
89
|
-
memory: "1g" # Docker RAM limit
|
|
90
|
-
drain: 10 # Graceful drain period (seconds) before old slot stops
|
|
91
|
-
stop_timeout: 15 # Grace period before SIGKILL
|
|
92
|
-
volumes:
|
|
93
|
-
- /var/lib/epd/volumes/uploads:/app/uploads
|
|
94
|
-
env:
|
|
95
|
-
clear:
|
|
96
|
-
APP_ENV: production
|
|
97
|
-
secret:
|
|
98
|
-
- APP_SECRET
|
|
99
|
-
|
|
100
|
-
worker: # Background worker service (no exposed routes)
|
|
101
|
-
hosts: [203.0.113.10]
|
|
102
|
-
replicas: 1
|
|
103
|
-
command: bun run worker.ts # Custom entrypoint command
|
|
104
|
-
|
|
105
|
-
# ==============================================================================
|
|
106
|
-
# Shared Reverse Proxy (Traefik)
|
|
107
|
-
# ==============================================================================
|
|
108
|
-
proxy:
|
|
109
|
-
enabled: true # Start & manage shared Traefik proxy (default: true)
|
|
110
|
-
ssl: true # Auto-provision Let's Encrypt SSL (default: true)
|
|
111
|
-
email: admin@myapp.com # ACME registration email
|
|
112
|
-
challenge: http # SSL challenge type: "http" | "dns" | "tlsalpn"
|
|
113
|
-
entrypoints:
|
|
114
|
-
web: 80
|
|
115
|
-
websecure: 443
|
|
116
|
-
cross_host: false # Route requests across all cluster nodes
|
|
117
|
-
private_ips: # VPC IPs for cross-host load balancing
|
|
118
|
-
203.0.113.10: 10.0.0.10
|
|
119
|
-
|
|
120
|
-
# ==============================================================================
|
|
121
|
-
# Automated DNS Synchronization (Cloudflare / Hetzner)
|
|
122
|
-
# ==============================================================================
|
|
123
|
-
dns:
|
|
124
|
-
provider: cloudflare # "cloudflare" | "hetzner"
|
|
125
|
-
api_token: ${DNS_API_TOKEN} # Provider API token
|
|
126
|
-
proxied: true # Cloudflare CDN orange-cloud (default: true)
|
|
127
|
-
ttl: 300 # DNS TTL in seconds
|
|
128
|
-
auto_sync: true # Sync on epd deploy and epd setup (default: true)
|
|
129
|
-
|
|
130
|
-
# ==============================================================================
|
|
131
|
-
# Hetzner Cloud Integration
|
|
132
|
-
# ==============================================================================
|
|
133
|
-
hetzner:
|
|
134
|
-
api_token: ${HETZNER_API_TOKEN}
|
|
135
|
-
|
|
136
|
-
# ==============================================================================
|
|
137
|
-
# Health Check Probes
|
|
138
|
-
# ==============================================================================
|
|
139
|
-
healthcheck:
|
|
140
|
-
path: /health # HTTP endpoint to probe (default: "/")
|
|
141
|
-
status: 200-399 # Acceptable HTTP status codes
|
|
142
|
-
timeout: 60 # Timeout in seconds before rolling back
|
|
143
|
-
interval: 2 # Seconds between probe attempts
|
|
144
|
-
delay: 1 # Initial seconds before first probe
|
|
145
|
-
|
|
146
|
-
# ==============================================================================
|
|
147
|
-
# Environment Variables & Secrets
|
|
148
|
-
# ==============================================================================
|
|
149
|
-
env:
|
|
150
|
-
clear: # Public variables (safe in git)
|
|
151
|
-
NODE_ENV: production
|
|
152
|
-
secret: # Private secrets (read from .env or shell)
|
|
153
|
-
- DATABASE_URL
|
|
154
|
-
- STRIPE_KEY
|
|
155
|
-
|
|
156
|
-
# ==============================================================================
|
|
157
|
-
# Persistent Accessories (Databases, Caches)
|
|
158
|
-
# ==============================================================================
|
|
159
|
-
accessories:
|
|
160
|
-
db:
|
|
161
|
-
image: postgres:17-alpine
|
|
162
|
-
host: 203.0.113.10
|
|
163
|
-
env:
|
|
164
|
-
clear:
|
|
165
|
-
POSTGRES_DB: myapp
|
|
166
|
-
secret:
|
|
167
|
-
- POSTGRES_PASSWORD
|
|
168
|
-
volumes:
|
|
169
|
-
- /var/lib/epd/volumes/myapp-db:/var/lib/postgresql/data
|
|
170
|
-
ports:
|
|
171
|
-
- "127.0.0.1:5432:5432"
|
|
172
|
-
|
|
173
|
-
redis:
|
|
174
|
-
image: redis:7-alpine
|
|
175
|
-
host: 203.0.113.10
|
|
176
|
-
volumes:
|
|
177
|
-
- /var/lib/epd/volumes/myapp-redis:/data
|
|
178
|
-
|
|
179
|
-
# ==============================================================================
|
|
180
|
-
# Lifecycle Hooks
|
|
181
|
-
# ==============================================================================
|
|
182
|
-
hooks:
|
|
183
|
-
pre_build: ./scripts/lint.sh
|
|
184
|
-
pre_deploy: ./scripts/db-migrate.sh
|
|
185
|
-
post_deploy: ./scripts/notify-slack.sh
|
|
186
|
-
on_failure: ./scripts/alert-ops.sh
|
|
187
|
-
|
|
188
|
-
# ==============================================================================
|
|
189
|
-
# General Strategy & Retention
|
|
190
|
-
# ==============================================================================
|
|
191
|
-
strategy: rolling # Rollout strategy: "rolling" | "parallel"
|
|
192
|
-
keep_releases: 5 # Past images / releases to retain (1-1000)
|
|
193
|
-
remote_root: /var/lib/epd # Root directory on remote hosts
|
|
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.
|