@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.
Files changed (4) hide show
  1. package/README.md +66 -13
  2. package/dist/cli.js +1039 -42
  3. package/docs/guide.md +59 -11
  4. package/package.json +1 -1
package/docs/guide.md CHANGED
@@ -328,32 +328,80 @@ proxy:
328
328
  dns_env: [CF_DNS_API_TOKEN]
329
329
  ```
330
330
 
331
- ### Cloudflare Automations & DNS Auto-Sync
332
- `epd` can automatically keep Cloudflare DNS records in sync with your servers on every deploy and setup:
331
+ ### Multi-Provider DNS Automations (Cloudflare & Hetzner DNS)
332
+ `epd` can automatically keep DNS records in sync with your servers on every deploy and setup across multiple DNS providers:
333
333
 
334
334
  ```yaml
335
- cloudflare:
336
- api_token: ${CLOUDFLARE_API_TOKEN}
335
+ dns:
336
+ provider: cloudflare # or hetzner
337
+ api_token: ${DNS_API_TOKEN}
337
338
  # zone_id is optional; auto-detected from domain if omitted
338
- proxied: true # default: true (orange cloud CDN/DDoS), or false (gray cloud / DNS-only)
339
- ttl: 1 # default: 1 (auto)
340
- auto_sync: true # default: true (auto sync on deploy and setup)
339
+ proxied: true # Cloudflare orange cloud CDN (default: true)
340
+ ttl: 300 # Hetzner default: 300; Cloudflare: 1 (auto)
341
+ auto_sync: true # default: true (auto sync on deploy and setup)
341
342
  # domains: [custom.com] # optional; defaults to all domains in routes
342
343
  ```
343
344
 
345
+ *(Legacy `cloudflare:` block is also supported).*
346
+
344
347
  CLI commands:
345
348
  ```bash
346
349
  # Check status vs servers without modifying
347
- epd cloudflare dns status
350
+ epd dns status
348
351
 
349
352
  # Synchronize DNS records
350
- epd cloudflare dns sync
351
- epd cloudflare dns sync --dry-run
352
- epd cloudflare dns sync --no-proxied
353
+ epd dns sync
354
+ epd dns sync --dry-run
355
+ epd dns sync --no-proxied
353
356
  ```
354
357
 
355
358
  ---
356
359
 
360
+ ### Hetzner Cloud Server Provisioning & Dynamic Targets
361
+
362
+ `epd` includes built-in integration with Hetzner Cloud (`hcloud`).
363
+
364
+ #### CLI Commands
365
+ ```bash
366
+ # List all servers in the Hetzner project
367
+ epd hetzner list
368
+
369
+ # Inspect available server types, vCPUs, RAM, and pricing
370
+ epd hetzner types
371
+
372
+ # Inspect available datacenter locations
373
+ epd hetzner locations
374
+
375
+ # Create and provision a server (defaults: cx22, fsn1, ubuntu-24.04)
376
+ epd hetzner create app-server-1 --type cx22 --location fsn1
377
+
378
+ # Create and immediately configure the server with Docker & Traefik
379
+ epd hetzner create app-server-1 --setup
380
+
381
+ # Delete a server
382
+ epd hetzner delete app-server-1
383
+ ```
384
+
385
+ #### Dynamic Server Hosts in `epd.yml`
386
+ Instead of hardcoding static IP addresses, you can target servers by name or label selector:
387
+
388
+ ```yaml
389
+ hetzner:
390
+ api_token: ${HETZNER_API_TOKEN}
391
+
392
+ servers:
393
+ web:
394
+ hosts:
395
+ - hetzner:app-server-1 # Query single server by name
396
+ - hetzner:label:app=web,env=prod # Query all servers matching label selector
397
+ port: 3000
398
+ domains: [example.com]
399
+ ```
400
+
401
+ When deploying (`epd deploy` or `epd setup`), `epd` automatically resolves these targets into live public IP addresses via the Hetzner Cloud API.
402
+
403
+ ---
404
+
357
405
  ## 9. Secrets & Environment Management
358
406
 
359
407
  `epd` ensures secrets are never checked into git, never printed in `docker inspect`, and never written to shell histories.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabioplunser/epd",
3
- "version": "0.2.0",
3
+ "version": "0.3.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",