@fabioplunser/epd 0.1.1 → 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 CHANGED
@@ -328,6 +328,78 @@ proxy:
328
328
 
329
329
  The listed variables are read from your environment and passed to Traefik.
330
330
 
331
+ ### Multi-Provider DNS Automation (Cloudflare & Hetzner DNS)
332
+
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
+
335
+ ```yaml
336
+ # Unified DNS configuration
337
+ dns:
338
+ provider: cloudflare # or hetzner
339
+ api_token: ${DNS_API_TOKEN}
340
+ # zone_id is optional; auto-discovered from your domain name
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
344
+ ```
345
+
346
+ *(For backward compatibility, the top-level `cloudflare:` block is also supported).*
347
+
348
+ Manage or preview DNS changes with the CLI:
349
+ ```bash
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
379
+ ```
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
+
331
403
  ---
332
404
 
333
405
  ## Without Docker: process mode
@@ -384,6 +456,9 @@ they need Docker on their host.
384
456
  | `epd config` | The resolved configuration; `--traefik` for the proxy files |
385
457
  | `epd docker-command` | Print the exact `docker run` (or pm2) commands epd uses (including accessories) |
386
458
  | `epd lock status\|release` | The deploy lock |
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`) |
387
462
  | `epd remove` | Stop this app and delete its files from the servers |
388
463
 
389
464
  Global flags: `-c/--config`, `-d/--destination`, `-v/--verbose`.