-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextdeploy.yml
More file actions
103 lines (93 loc) · 3.61 KB
/
Copy pathnextdeploy.yml
File metadata and controls
103 lines (93 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# ==============================
# NEXTDEPLOY CONFIGURATION FILE
# ==============================
# This YAML defines everything needed to build, deploy, monitor, and scale your app on a VPS/SERVERLESS using NextDeploy.
# Think of it as your infrastructure-as-code for end-to-end delivery.
# NOTE: DO NOT ADD YOUR SECRETS AS OF NOW WE WORKING ON SECRET MANAGMENT THIS IS HOW WE INTENT TO USE
version: "1.0" # Config file versioning for forward compatibility with future NextDeploy updates
# -----
# TARGET TYPE — "serverless" covers both AWS (Lambda + CloudFront) and Cloudflare (Workers + R2)
# -----
target_type: serverless
# -----
# APP METADATA
# -----
app:
name: nextdeploy-frontend # [REQUIRED] Unique app name used for identification
environment: production # [REQUIRED] production | staging | development
domain: nextdeploy.org # Public domain for your app
port: 3000 # [REQUIRED] Internal port your app listens on (used locally; Workers ignore this)
# -----
# CLOUD PROVIDER — CLOUDFLARE
# Credentials are read from env vars (recommended) or the credstore.
# Required env vars:
# CLOUDFLARE_API_TOKEN — management plane (Workers, DNS, R2 bucket lifecycle)
# CLOUDFLARE_ACCOUNT_ID — can also be set via account_id below
# R2_ACCESS_KEY_ID — R2 object uploads (S3-compatible)
# R2_SECRET_ACCESS_KEY — R2 object uploads (S3-compatible)
# -----
CloudProvider:
name: cloudflare
account_id: "YOUR_CLOUDFLARE_ACCOUNT_ID" # Fallback if CLOUDFLARE_ACCOUNT_ID env var is unset
# -----
# SERVERLESS CONFIGURATION (Cloudflare Workers)
# -----
serverless:
provider: cloudflare
cloudflare:
compatibility_date: "2025-04-01"
compatibility_flags:
- nodejs_compat_v2
# custom_domains:
# - hostname: app.example.com
# triggers:
# crons:
# - "0 * * * *"
# bindings:
# r2:
# - name: ASSETS
# Full schema: bindings (r2, kv, hyperdrive, queues, vectorize, ai, durable_objects),
# migrations, and resources (hyperdrive, queues, vectorize, ai_gateway, dns, zone_settings).
# -----
# LOGGING CONFIGURATION
# -----
logging:
enabled: true # Enable logging system
provider: nextdeploy # Use NextDeploy's internal logging daemon (alternatively: syslog, logtail, etc.)
stream_logs: true # Send live container logs to dashboard (tail -f equivalent)
log_path: /var/log/containers/example-app.log # Path on server where logs are persisted
# -----
# MONITORING & ALERTING
# -----
monitoring:
enabled: true # Enables resource monitoring for CPU, memory, disk
cpu_threshold: 80 # Alert if CPU usage goes over 80%
memory_threshold: 75 # Alert if memory usage exceeds 75%
disk_threshold: 90 # Alert if disk usage crosses 90%
alert:
email: ops@example.com # Email to send alerts to
slack_webhook: https://hooks.slack.com/services/... # Slack channel webhook for real-time alerting
notify_on:
- crash # App/container crash
- healthcheck_failed # Failed /api/health checks
- high_cpu
- high_memory
# -----
# BACKUP STRATEGY
# -----
backup:
enabled: true # Enable automatic backups
frequency: daily # Options: hourly | daily | weekly
retention_days: 7 # Keep backups for 7 days
storage:
provider: s3 # Use S3-compatible storage (AWS S3, MinIO, Wasabi, etc.)
bucket: nextdeploy-backups # S3 bucket name
region: us-east-1 # AWS region
# -----
# WEBHOOKS AFTER DEPLOYMENT
# -----
webhook:
on_success:
- curl -X POST https://your-api.com/deploy/success # Notify external system (e.g., Slack, Discord, CI dashboard)
on_failure:
- curl -X POST https://your-api.com/deploy/failure # Used for alerting, logging, or rollback triggers