@fabioplunser/epd 0.3.0 → 0.4.0

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.
@@ -0,0 +1,95 @@
1
+ # Hetzner Cloud & Multi-Provider DNS
2
+
3
+ `epd` includes native integrations with **Hetzner Cloud** and automated DNS synchronization across **Cloudflare** and **Hetzner DNS**.
4
+
5
+ ---
6
+
7
+ ## 1. Multi-Provider DNS Automation
8
+
9
+ `epd` can automatically manage and synchronize `A` and `AAAA` records for all configured service routes.
10
+
11
+ ### Configuration (`epd.yml`)
12
+
13
+ ```yaml
14
+ # Unified DNS configuration
15
+ dns:
16
+ provider: cloudflare # or "hetzner"
17
+ api_token: ${DNS_API_TOKEN}
18
+ # zone_id: ... # Optional; auto-discovered from domain name
19
+ proxied: true # Cloudflare CDN/proxy (default: true)
20
+ ttl: 300 # Hetzner default: 300; Cloudflare: 1 (auto)
21
+ auto_sync: true # Sync records automatically on setup and deploy
22
+ ```
23
+
24
+ *(Legacy `cloudflare:` configuration is also supported).*
25
+
26
+ ### CLI Commands
27
+
28
+ ```bash
29
+ # Check status of domains vs server IPs
30
+ epd dns status
31
+
32
+ # Synchronize DNS records
33
+ epd dns sync
34
+
35
+ # Preview changes without modifying records
36
+ epd dns sync --dry-run
37
+
38
+ # Disable Cloudflare CDN proxy (DNS-only)
39
+ epd dns sync --no-proxied
40
+ ```
41
+
42
+ ---
43
+
44
+ ## 2. Hetzner Cloud Integration
45
+
46
+ Manage and provision Hetzner Cloud servers directly with `epd hetzner`:
47
+
48
+ ### CLI Commands
49
+
50
+ ```bash
51
+ # List all Hetzner servers in your project
52
+ epd hetzner list
53
+
54
+ # Inspect available server types, vCPUs, RAM, and pricing (EUR/mo)
55
+ epd hetzner types
56
+
57
+ # Inspect available datacenter locations
58
+ epd hetzner locations
59
+
60
+ # Create a new server (default: cx22 in fsn1 with ubuntu-24.04)
61
+ epd hetzner create prod-web-1 --type cx22 --location fsn1
62
+
63
+ # Create and automatically prepare with Docker, PM2, and Traefik:
64
+ epd hetzner create prod-web-1 --setup
65
+
66
+ # Delete a server
67
+ epd hetzner delete prod-web-1
68
+ ```
69
+
70
+ ### Dynamic Target Servers in `epd.yml`
71
+
72
+ Instead of static IP addresses, you can target servers by **name** or **label selector**:
73
+
74
+ ```yaml
75
+ hetzner:
76
+ api_token: ${HETZNER_API_TOKEN}
77
+
78
+ servers:
79
+ web:
80
+ hosts:
81
+ - hetzner:prod-web-1 # Target single server by name
82
+ - hetzner:label:app=web,env=prod # Target all servers matching labels
83
+ port: 3000
84
+ domains: [example.com]
85
+ ```
86
+
87
+ When deploying (`epd deploy` or `epd setup`), `epd` dynamically queries the Hetzner Cloud API to resolve targets to their live public IP addresses.
88
+
89
+ ---
90
+
91
+ ## Related Documentation
92
+
93
+ - **[Getting Started Guide](/guide/getting-started)**: Deploy your first app in 5 minutes.
94
+ - **[GitHub Actions CI/CD](/ci-cd)**: Automate deploys on every push.
95
+ - **[CLI Reference](/reference/cli)**: Full command reference for `epd hetzner` and `epd dns`.
package/docs/index.md ADDED
@@ -0,0 +1,71 @@
1
+ ---
2
+ layout: home
3
+
4
+ hero:
5
+ name: "EPD"
6
+ text: "Easy Project Deployer"
7
+ tagline: "Zero-downtime deployments from terminal, GitHub Actions, or local CLI over standard SSH."
8
+ actions:
9
+ - theme: brand
10
+ text: 🚀 Get Started
11
+ link: /guide/getting-started
12
+ - theme: alt
13
+ text: 📖 Documentation Hub
14
+ link: /guide
15
+ - theme: alt
16
+ text: 🤖 GitHub Actions CI/CD
17
+ link: /ci-cd
18
+ - theme: alt
19
+ text: View on GitHub
20
+ link: https://github.com/FabioPlunser/epd
21
+ ---
22
+
23
+ <DeployAnimation />
24
+
25
+ ---
26
+
27
+ ## Quick Install
28
+
29
+ ::: code-group
30
+
31
+ ```bash [bun]
32
+ bun install -g @fabioplunser/epd
33
+ ```
34
+
35
+ ```bash [npm]
36
+ npm install -g @fabioplunser/epd
37
+ ```
38
+
39
+ ```bash [pnpm]
40
+ pnpm add -g @fabioplunser/epd
41
+ ```
42
+
43
+ ```bash [npx (no install)]
44
+ npx @fabioplunser/epd deploy
45
+ ```
46
+
47
+ ```bash [Standalone Binary (Linux)]
48
+ curl -fsSL https://github.com/FabioPlunser/epd/releases/latest/download/epd-linux-x64 -o /usr/local/bin/epd
49
+ chmod +x /usr/local/bin/epd
50
+ ```
51
+
52
+ :::
53
+
54
+ ## 30-Second Quickstart
55
+
56
+ ```bash
57
+ cd my-project
58
+
59
+ # 1. Initialize epd.yml (and optional starter Dockerfile / GitHub Action)
60
+ epd init --ci
61
+
62
+ # 2. Setup your servers (Docker/PM2, Traefik, networks) and run first deploy
63
+ epd setup
64
+
65
+ # 3. Deploy updates anytime with zero downtime
66
+ epd deploy
67
+ ```
68
+
69
+ ::: tip Ready to dive deeper?
70
+ Follow the step-by-step **[Getting Started Guide](/guide/getting-started)** or read about **[Architecture & Concepts](/guide/architecture)**.
71
+ :::
@@ -0,0 +1 @@
1
+ epd.peppi.dev
@@ -0,0 +1,52 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
2
+ <defs>
3
+ <linearGradient id="epd-bg" x1="0" y1="0" x2="64" y2="64" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0%" stop-color="#0f172a"/>
5
+ <stop offset="100%" stop-color="#1e1b4b"/>
6
+ </linearGradient>
7
+ <linearGradient id="epd-rocket" x1="20" y1="10" x2="44" y2="42" gradientUnits="userSpaceOnUse">
8
+ <stop offset="0%" stop-color="#38bdf8"/>
9
+ <stop offset="50%" stop-color="#6366f1"/>
10
+ <stop offset="100%" stop-color="#a855f7"/>
11
+ </linearGradient>
12
+ <linearGradient id="epd-flame" x1="32" y1="39" x2="32" y2="56" gradientUnits="userSpaceOnUse">
13
+ <stop offset="0%" stop-color="#fbbf24"/>
14
+ <stop offset="40%" stop-color="#ef4444"/>
15
+ <stop offset="100%" stop-color="#a855f7" stop-opacity="0"/>
16
+ </linearGradient>
17
+ <linearGradient id="epd-ring" x1="16" y1="36" x2="48" y2="36" gradientUnits="userSpaceOnUse">
18
+ <stop offset="0%" stop-color="#10b981"/>
19
+ <stop offset="100%" stop-color="#06b6d4"/>
20
+ </linearGradient>
21
+ <filter id="epd-glow" x="-20%" y="-20%" width="140%" height="140%">
22
+ <feGaussianBlur stdDeviation="1.5" result="blur"/>
23
+ <feComposite in="SourceGraphic" in2="blur" operator="over"/>
24
+ </filter>
25
+ </defs>
26
+
27
+ <!-- Background Squircle -->
28
+ <rect x="2" y="2" width="60" height="60" rx="14" fill="url(#epd-bg)" stroke="#38bdf8" stroke-opacity="0.3" stroke-width="1.5"/>
29
+
30
+ <!-- Zero-Downtime Orbit / Ring -->
31
+ <ellipse cx="32" cy="38" rx="18" ry="5.5" fill="none" stroke="url(#epd-ring)" stroke-width="2" stroke-dasharray="3.5 2.5" opacity="0.85"/>
32
+
33
+ <!-- Flame Exhaust -->
34
+ <path d="M 28 41 C 28 41 32 55 32 55 C 32 55 36 41 36 41 C 34 43 30 43 28 41 Z" fill="url(#epd-flame)" filter="url(#epd-glow)"/>
35
+ <path d="M 29.5 41 C 29.5 41 32 49 32 49 C 32 49 34.5 41 34.5 41 Z" fill="#fef08a"/>
36
+
37
+ <!-- Rocket Left Fin -->
38
+ <path d="M 24 33 L 17 41 C 17 41 21 43 26 39 Z" fill="#4338ca"/>
39
+
40
+ <!-- Rocket Right Fin -->
41
+ <path d="M 40 33 L 47 41 C 47 41 43 43 38 39 Z" fill="#4338ca"/>
42
+
43
+ <!-- Main Rocket Fuselage -->
44
+ <path d="M 32 9 C 26 17 24 27 24 39 C 27 41 37 41 40 39 C 40 27 38 17 32 9 Z" fill="url(#epd-rocket)"/>
45
+
46
+ <!-- Center Porthole / Window -->
47
+ <circle cx="32" cy="23" r="4.5" fill="#0f172a" stroke="#e0f2fe" stroke-width="1.5"/>
48
+ <circle cx="33.5" cy="21.5" r="1.5" fill="#38bdf8"/>
49
+
50
+ <!-- Top Shimmer -->
51
+ <path d="M 32 9 C 30 13 28.5 17 28 19 C 30.5 18 33.5 18 36 19 C 35.5 17 34 13 32 9 Z" fill="#ffffff" fill-opacity="0.35"/>
52
+ </svg>
@@ -0,0 +1,238 @@
1
+ # CLI Commands Reference
2
+
3
+ Complete reference for all commands and options provided by the `epd` CLI.
4
+
5
+ ---
6
+
7
+ ## Command Overview
8
+
9
+ | Command | Usage | Description |
10
+ |---|---|---|
11
+ | [`epd init`](#epd-init) | `epd init [--ci]` | Initialize a new project with interactive runtime detection. |
12
+ | [`epd auth`](#epd-auth) | `epd auth [subcommand]` | Manage linked Cloudflare & Hetzner credentials globally or per project. |
13
+ | [`epd setup`](#epd-setup) | `epd setup [--host <ip>]` | Provision server prerequisites, launch Traefik, and run initial deploy. |
14
+ | [`epd deploy`](#epd-deploy) | `epd deploy [-d <dest>]` | Build and deploy with zero downtime blue/green switching. |
15
+ | [`epd redeploy`](#epd-redeploy) | `epd redeploy` | Restart current running version without rebuilding or uploading. |
16
+ | [`epd rollback`](#epd-rollback) | `epd rollback [version]` | Revert traffic to the previous version or a listed version. |
17
+ | [`epd status`](#epd-status) | `epd status [--json]` | Show live slots, running replicas, accessories, and route health. |
18
+ | [`epd logs`](#epd-logs) | `epd logs [-f] [-n <num>]` | Stream and tail logs from services, accessories, or servers. |
19
+ | [`epd exec`](#epd-exec) | `epd exec -- <cmd>` | Execute a one-off command in the app's container environment. |
20
+ | [`epd shell`](#epd-shell) | `epd shell` | Open an interactive terminal inside a live replica or accessory. |
21
+ | [`epd proxy`](#epd-proxy) | `epd proxy <action>` | Inspect, view logs, view routes, or restart shared Traefik proxy. |
22
+ | [`epd dns`](#epd-dns) | `epd dns <action>` | Check status or synchronize DNS records with Cloudflare or Hetzner. |
23
+ | [`epd hetzner`](#epd-hetzner) | `epd hetzner <action>` | List, create, provision, or delete Hetzner Cloud servers. |
24
+ | [`epd lock`](#epd-lock) | `epd lock <action>` | Inspect or clear atomic deployment locks. |
25
+ | [`epd config`](#epd-config) | `epd config [--raw]` | Validate and display resolved `epd.yml` configuration. |
26
+ | [`epd docker-command`](#epd-docker-command)| `epd docker-command` | Output copy-pasteable `docker run` commands for debugging. |
27
+ | [`epd remove`](#epd-remove) | `epd remove [-y]` | Stop application, remove routes, and delete files from servers. |
28
+
29
+ ---
30
+
31
+ ## `epd init`
32
+
33
+ Interactively initializes `epd.yml` for the current project.
34
+
35
+ ```bash
36
+ epd init [options]
37
+ ```
38
+
39
+ ### Options:
40
+ - `--name <name>`: Override project name (defaults to folder name or `package.json`).
41
+ - `--mode <docker|process>`: Choose deployment runtime.
42
+ - `--host <ip>`: Server host IP address.
43
+ - `--domain <domain>`: Public domain to configure.
44
+ - `--port <port>`: Internal application port (default: 3000).
45
+ - `--dockerfile`: Automatically generate a starter `Dockerfile`.
46
+ - `--ci`: Automatically generate `.github/workflows/deploy.yml`.
47
+
48
+ ---
49
+
50
+ ## `epd auth`
51
+
52
+ Manage linked Cloudflare and Hetzner accounts (aliased as `epd login`).
53
+
54
+ ```bash
55
+ epd auth [status|cloudflare|hetzner|logout]
56
+ ```
57
+
58
+ Credentials can be saved globally in `~/.config/epd/auth.json` (with secure `0600` permissions) or saved in the current project's `.env` file. When linking an account, EPD prompts to open your browser to the exact token generation page with pre-filled permissions and validates the token live.
59
+
60
+ ### Subcommands:
61
+ - `epd auth`: Display the authentication status of all cloud providers.
62
+ - `epd auth cloudflare`: Launch interactive flow to connect Cloudflare for automated DNS and SSL.
63
+ - `epd auth hetzner`: Launch interactive flow to connect Hetzner Cloud for dynamic server resolution and DNS.
64
+ - `epd auth logout`: Clear globally stored authentication credentials.
65
+
66
+ ---
67
+
68
+ ## `epd setup`
69
+
70
+ Prepares fresh servers for deployment.
71
+
72
+ ```bash
73
+ epd setup [options]
74
+ ```
75
+
76
+ ### Options:
77
+ - `--host <ip>`: Run setup only on a specific host.
78
+ - `--skip-deploy`: Install prerequisites and start Traefik without executing the first deploy.
79
+
80
+ ---
81
+
82
+ ## `epd deploy`
83
+
84
+ Executes a zero-downtime blue/green deployment.
85
+
86
+ ```bash
87
+ epd deploy [options]
88
+ ```
89
+
90
+ ### Options:
91
+ - `-d, --destination <name>`: Deploy using overlay configuration (e.g., `epd.staging.yml`).
92
+ - `--service <name>`: Deploy only a specific service group (e.g. `--service web`).
93
+ - `--host <ip>`: Deploy only to a specific host.
94
+ - `--no-build`: Skip local image build (deploy existing image tag).
95
+ - `--version <tag>`: Explicit version/tag to assign to this release.
96
+ - `--recreate-accessories`: Rebuild and restart accessory containers (PostgreSQL, Redis, etc.).
97
+ - `--skip-health`: Skip healthcheck verification (not recommended for production).
98
+ - `--skip-hooks`: Skip `pre_deploy` / `post_deploy` lifecycle scripts.
99
+ - `--skip-lock`: Bypass atomic deployment concurrency lock.
100
+
101
+ ---
102
+
103
+ ## `epd rollback`
104
+
105
+ Instantly re-routes live traffic to the previously healthy slot.
106
+
107
+ ```bash
108
+ # Roll back to the immediately preceding version
109
+ epd rollback
110
+
111
+ # List all deployable versions stored on the server
112
+ epd rollback --list
113
+
114
+ # Roll back to a specific version
115
+ epd rollback <version>
116
+ ```
117
+
118
+ ---
119
+
120
+ ## `epd status`
121
+
122
+ Displays the current state across all servers.
123
+
124
+ ```bash
125
+ epd status [options]
126
+ ```
127
+
128
+ ### Options:
129
+ - `--json`: Output state as structured JSON (useful for custom monitoring scripts).
130
+
131
+ ---
132
+
133
+ ## `epd logs`
134
+
135
+ View or follow live container or PM2 logs.
136
+
137
+ ```bash
138
+ epd logs [options]
139
+ ```
140
+
141
+ ### Options:
142
+ - `-f, --follow`: Follow / stream logs in real time.
143
+ - `-n, --lines <number>`: Number of lines to show from the end of the logs (default: 100).
144
+ - `--service <name>`: Filter logs to a specific service (e.g. `web` or `worker`).
145
+ - `--accessory <name>`: View logs from an accessory container (e.g. `db`).
146
+ - `--host <ip>`: Filter logs to a specific server.
147
+ - `--grep <pattern>`: Filter log lines matching a string or pattern.
148
+ - `--since <time>`: Show logs since timestamp (e.g., `10m`, `1h`).
149
+
150
+ ---
151
+
152
+ ## `epd exec`
153
+
154
+ Run a one-off command inside the app's container environment on the server.
155
+
156
+ ```bash
157
+ # Run database migrations
158
+ epd exec -- bun run db:migrate
159
+
160
+ # Open an interactive shell inside Postgres accessory
161
+ epd exec --accessory db -i -- psql -U postgres
162
+ ```
163
+
164
+ ---
165
+
166
+ ## `epd shell`
167
+
168
+ Opens an interactive shell inside a running replica container.
169
+
170
+ ```bash
171
+ epd shell
172
+ epd shell --accessory db
173
+ epd shell --host 203.0.113.10
174
+ ```
175
+
176
+ ---
177
+
178
+ ## `epd proxy`
179
+
180
+ Manage and inspect the shared host Traefik reverse proxy.
181
+
182
+ ```bash
183
+ epd proxy status # View Traefik container status
184
+ epd proxy logs -f # Tail live Traefik access & error logs
185
+ epd proxy routes # View rendered dynamic routing configuration
186
+ epd proxy reboot # Restart Traefik proxy
187
+ ```
188
+
189
+ ---
190
+
191
+ ## `epd dns`
192
+
193
+ Manage automated DNS record synchronization with Cloudflare or Hetzner DNS.
194
+
195
+ ```bash
196
+ epd dns status # Compare live DNS records against server IPs
197
+ epd dns sync # Synchronize A/AAAA records
198
+ epd dns sync --dry-run # Preview changes without making API requests
199
+ epd dns sync --no-proxied # Disable Cloudflare CDN orange-cloud proxy
200
+ ```
201
+
202
+ ---
203
+
204
+ ## `epd hetzner`
205
+
206
+ Manage Hetzner Cloud infrastructure directly.
207
+
208
+ ```bash
209
+ epd hetzner list # List all servers in your Hetzner Cloud project
210
+ epd hetzner types # View server specs and prices (vCPU, RAM, EUR/mo)
211
+ epd hetzner locations # List available datacenter locations
212
+ epd hetzner create <name> # Create new VPS (e.g. --type cx22 --location fsn1)
213
+ epd hetzner create <name> --setup # Create and immediately configure with epd setup
214
+ epd hetzner delete <name> # Delete server
215
+ ```
216
+
217
+ ---
218
+
219
+ ## `epd lock`
220
+
221
+ Manage atomic deployment locks.
222
+
223
+ ```bash
224
+ epd lock status # Check who currently holds the deploy lock
225
+ epd lock release # Forcefully release the deploy lock
226
+ ```
227
+
228
+ ---
229
+
230
+ ## `epd remove`
231
+
232
+ Completely tear down an application from the servers.
233
+
234
+ ```bash
235
+ epd remove
236
+ epd remove -y # Non-interactive confirmation
237
+ epd remove --keep-data # Leave persistent volume data on disk
238
+ ```
@@ -0,0 +1,177 @@
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 (alphanumeric, dashes, underscores)
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} # Resolved from local environment variable
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
+ # SSH Connection Details
50
+ # ==============================================================================
51
+ ssh:
52
+ user: root # SSH username (default: root)
53
+ port: 22 # SSH port (default: 22)
54
+ key: ~/.ssh/id_ed25519 # Path to explicit private key
55
+ proxy_jump: bastion.net # Optional jump host / bastion
56
+ options: # Extra OpenSSH options
57
+ - ServerAliveInterval=30
58
+
59
+ # ==============================================================================
60
+ # Server Groups & Service Definitions
61
+ # ==============================================================================
62
+ servers:
63
+ web:
64
+ hosts: # Target servers (IPs or Hetzner selectors)
65
+ - 203.0.113.10
66
+ - hetzner:prod-web-1 # Dynamic Hetzner query by server name
67
+ - hetzner:label:app=web # Dynamic Hetzner query by label selector
68
+ replicas: 2 # Number of container replicas per host
69
+ port: 3000 # Internal port the app listens on
70
+ domains: [myapp.com] # Public domains (automatic SSL)
71
+ cpus: "2.0" # Docker CPU limit
72
+ memory: "1g" # Docker RAM limit
73
+ drain: 10 # Graceful drain period (seconds) before old slot stops
74
+ stop_timeout: 15 # Grace period before SIGKILL
75
+ volumes:
76
+ - /var/lib/epd/volumes/uploads:/app/uploads
77
+ env:
78
+ clear:
79
+ APP_ENV: production
80
+ secret:
81
+ - APP_SECRET
82
+
83
+ worker: # Background worker service (no exposed routes)
84
+ hosts: [203.0.113.10]
85
+ replicas: 1
86
+ command: bun run worker.ts # Custom entrypoint command
87
+
88
+ # ==============================================================================
89
+ # Shared Reverse Proxy (Traefik)
90
+ # ==============================================================================
91
+ proxy:
92
+ enabled: true # Start & manage shared Traefik proxy (default: true)
93
+ ssl: true # Auto-provision Let's Encrypt SSL (default: true)
94
+ email: admin@myapp.com # ACME registration email
95
+ challenge: http # SSL challenge type: "http" | "dns" | "tlsalpn"
96
+ entrypoints:
97
+ web: 80
98
+ websecure: 443
99
+ cross_host: false # Route requests across all cluster nodes
100
+ private_ips: # VPC IPs for cross-host load balancing
101
+ 203.0.113.10: 10.0.0.10
102
+
103
+ # ==============================================================================
104
+ # Automated DNS Synchronization (Cloudflare / Hetzner)
105
+ # ==============================================================================
106
+ dns:
107
+ provider: cloudflare # "cloudflare" | "hetzner"
108
+ api_token: ${DNS_API_TOKEN} # Provider API token
109
+ proxied: true # Cloudflare CDN orange-cloud (default: true)
110
+ ttl: 300 # DNS TTL in seconds
111
+ auto_sync: true # Sync on epd deploy and epd setup (default: true)
112
+
113
+ # ==============================================================================
114
+ # Hetzner Cloud Integration
115
+ # ==============================================================================
116
+ hetzner:
117
+ api_token: ${HETZNER_API_TOKEN}
118
+
119
+ # ==============================================================================
120
+ # Health Check Probes
121
+ # ==============================================================================
122
+ healthcheck:
123
+ path: /health # HTTP endpoint to probe (default: "/")
124
+ status: 200-399 # Acceptable HTTP status codes
125
+ timeout: 60 # Timeout in seconds before rolling back
126
+ interval: 2 # Seconds between probe attempts
127
+ delay: 1 # Initial seconds before first probe
128
+
129
+ # ==============================================================================
130
+ # Environment Variables & Secrets
131
+ # ==============================================================================
132
+ env:
133
+ clear: # Public variables (safe in git)
134
+ NODE_ENV: production
135
+ secret: # Private secrets (read from .env or shell)
136
+ - DATABASE_URL
137
+ - STRIPE_KEY
138
+
139
+ # ==============================================================================
140
+ # Persistent Accessories (Databases, Caches)
141
+ # ==============================================================================
142
+ accessories:
143
+ db:
144
+ image: postgres:17-alpine
145
+ host: 203.0.113.10
146
+ env:
147
+ clear:
148
+ POSTGRES_DB: myapp
149
+ secret:
150
+ - POSTGRES_PASSWORD
151
+ volumes:
152
+ - /var/lib/epd/volumes/myapp-db:/var/lib/postgresql/data
153
+ ports:
154
+ - "127.0.0.1:5432:5432"
155
+
156
+ redis:
157
+ image: redis:7-alpine
158
+ host: 203.0.113.10
159
+ volumes:
160
+ - /var/lib/epd/volumes/myapp-redis:/data
161
+
162
+ # ==============================================================================
163
+ # Lifecycle Hooks
164
+ # ==============================================================================
165
+ hooks:
166
+ pre_build: ./scripts/lint.sh
167
+ pre_deploy: ./scripts/db-migrate.sh
168
+ post_deploy: ./scripts/notify-slack.sh
169
+ on_failure: ./scripts/alert-ops.sh
170
+
171
+ # ==============================================================================
172
+ # General Strategy & Retention
173
+ # ==============================================================================
174
+ strategy: rolling # Rollout strategy: "rolling" | "parallel"
175
+ keep_releases: 5 # Number of past images / releases to retain
176
+ remote_root: /var/lib/epd # Root directory on remote hosts
177
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabioplunser/epd",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Easy Project Deployer — deploy any project to one or many servers with Docker or PM2, fronted by Traefik.",
5
5
  "type": "module",
6
6
  "author": "Fabio Plünser",
@@ -44,6 +44,9 @@
44
44
  "build:binaries": "bun run scripts/build-all.ts",
45
45
  "typecheck": "tsc --noEmit",
46
46
  "test": "bun test",
47
+ "docs:dev": "vitepress dev docs",
48
+ "docs:build": "vitepress build docs",
49
+ "docs:preview": "vitepress preview docs",
47
50
  "prepublishOnly": "bun run typecheck && bun test && bun run build:bundle"
48
51
  },
49
52
  "engines": {
@@ -51,6 +54,7 @@
51
54
  },
52
55
  "devDependencies": {
53
56
  "@types/bun": "latest",
54
- "typescript": "^5.6.0"
57
+ "typescript": "^5.6.0",
58
+ "vitepress": "^1.6.4"
55
59
  }
56
60
  }