@fabioplunser/epd 0.2.0 → 0.3.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.
- package/README.md +66 -13
- package/dist/cli.js +1039 -42
- package/docs/guide.md +59 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -328,27 +328,78 @@ proxy:
|
|
|
328
328
|
|
|
329
329
|
The listed variables are read from your environment and passed to Traefik.
|
|
330
330
|
|
|
331
|
-
###
|
|
331
|
+
### Multi-Provider DNS Automation (Cloudflare & Hetzner DNS)
|
|
332
332
|
|
|
333
|
-
`epd` can automatically manage
|
|
333
|
+
`epd` can automatically manage DNS `A` and `AAAA` records for your application domains, pointing them to all configured servers with automatic record synchronization during setup and deploy. Both **Cloudflare** and **Hetzner DNS** are supported out of the box:
|
|
334
334
|
|
|
335
335
|
```yaml
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
# Unified DNS configuration
|
|
337
|
+
dns:
|
|
338
|
+
provider: cloudflare # or hetzner
|
|
339
|
+
api_token: ${DNS_API_TOKEN}
|
|
338
340
|
# zone_id is optional; auto-discovered from your domain name
|
|
339
|
-
proxied: true
|
|
340
|
-
ttl:
|
|
341
|
-
auto_sync: true
|
|
341
|
+
proxied: true # Cloudflare CDN/proxy (default: true)
|
|
342
|
+
ttl: 300 # Hetzner default: 300; Cloudflare: 1 (auto)
|
|
343
|
+
auto_sync: true # automatically sync records on setup and deploy
|
|
342
344
|
```
|
|
343
345
|
|
|
344
|
-
|
|
346
|
+
*(For backward compatibility, the top-level `cloudflare:` block is also supported).*
|
|
347
|
+
|
|
348
|
+
Manage or preview DNS changes with the CLI:
|
|
345
349
|
```bash
|
|
346
|
-
epd
|
|
347
|
-
epd
|
|
348
|
-
epd
|
|
349
|
-
epd
|
|
350
|
+
epd dns status # Compare current DNS records vs server IPs
|
|
351
|
+
epd dns sync # Sync A/AAAA records across all routed domains
|
|
352
|
+
epd dns sync --dry-run # Preview changes without modifying DNS
|
|
353
|
+
epd dns sync --no-proxied # Disable CDN proxying (DNS-only)
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
### Hetzner Cloud Integration & Dynamic Provisioning
|
|
359
|
+
|
|
360
|
+
`epd` natively integrates with **Hetzner Cloud** (`hcloud`) to list, provision, and deploy directly to Hetzner servers without manually copying IP addresses.
|
|
361
|
+
|
|
362
|
+
#### 1. Managing Servers with the CLI
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# List all Hetzner servers with their status, public IPs, and locations
|
|
366
|
+
epd hetzner list
|
|
367
|
+
|
|
368
|
+
# Inspect available server types, vCPUs, RAM, and pricing
|
|
369
|
+
epd hetzner types
|
|
370
|
+
|
|
371
|
+
# Create and provision a new Hetzner server (default: cx22 in fsn1 with ubuntu-24.04)
|
|
372
|
+
epd hetzner create prod-web-1 --type cx22 --location fsn1
|
|
373
|
+
|
|
374
|
+
# Create and automatically prepare the server with Docker & Traefik:
|
|
375
|
+
epd hetzner create prod-web-1 --setup
|
|
376
|
+
|
|
377
|
+
# Delete a server
|
|
378
|
+
epd hetzner delete prod-web-1
|
|
350
379
|
```
|
|
351
380
|
|
|
381
|
+
Set `HETZNER_API_TOKEN` or `HCLOUD_TOKEN` in your environment (or `hetzner.api_token` in `epd.yml`).
|
|
382
|
+
|
|
383
|
+
#### 2. Dynamic Server Targets in `epd.yml`
|
|
384
|
+
|
|
385
|
+
Instead of hardcoding IP addresses, deploy to Hetzner servers by **name** or **label selector**:
|
|
386
|
+
|
|
387
|
+
```yaml
|
|
388
|
+
hetzner:
|
|
389
|
+
api_token: ${HETZNER_API_TOKEN}
|
|
390
|
+
|
|
391
|
+
servers:
|
|
392
|
+
web:
|
|
393
|
+
# Resolve servers by name or label selector:
|
|
394
|
+
hosts:
|
|
395
|
+
- hetzner:prod-web-1
|
|
396
|
+
- hetzner:label:app=web,env=prod
|
|
397
|
+
port: 3000
|
|
398
|
+
domains: [example.com]
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
When running `epd setup` or `epd deploy`, `epd` queries the Hetzner Cloud API in real time to resolve matching servers to their public IP addresses.
|
|
402
|
+
|
|
352
403
|
---
|
|
353
404
|
|
|
354
405
|
## Without Docker: process mode
|
|
@@ -405,7 +456,9 @@ they need Docker on their host.
|
|
|
405
456
|
| `epd config` | The resolved configuration; `--traefik` for the proxy files |
|
|
406
457
|
| `epd docker-command` | Print the exact `docker run` (or pm2) commands epd uses (including accessories) |
|
|
407
458
|
| `epd lock status\|release` | The deploy lock |
|
|
408
|
-
| `epd
|
|
459
|
+
| `epd dns [sync\|status]` | Unified DNS automation (Cloudflare & Hetzner DNS) |
|
|
460
|
+
| `epd hetzner list\|create\|delete` | Manage and provision Hetzner Cloud servers |
|
|
461
|
+
| `epd cloudflare dns [sync\|status]` | Cloudflare DNS record management (alias for `epd dns`) |
|
|
409
462
|
| `epd remove` | Stop this app and delete its files from the servers |
|
|
410
463
|
|
|
411
464
|
Global flags: `-c/--config`, `-d/--destination`, `-v/--verbose`.
|