-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathshipnode.conf.example
More file actions
153 lines (130 loc) · 5.05 KB
/
shipnode.conf.example
File metadata and controls
153 lines (130 loc) · 5.05 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# ShipNode Configuration File
# Copy this to shipnode.conf and customize for your project
# ============================================
# App Type
# ============================================
# Options: "backend" or "frontend"
# - backend: Node.js app with PM2 process management
# - frontend: Static files (React, Vue, etc.)
APP_TYPE=backend
# ============================================
# SSH Connection
# ============================================
SSH_USER=root
SSH_HOST=your-server-ip
SSH_PORT=22
# ============================================
# Node.js Version
# ============================================
# Node.js major version to install on remote server
# Options: "lts" (recommended), "20", "22", "18", etc.
# Use major version only (not 22.14.0, just 22)
# Default: lts
NODE_VERSION=lts
# ============================================
# Deployment Path
# ============================================
# Where your app will be deployed on the server
REMOTE_PATH=/var/www/myapp
# ============================================
# Backend-specific Settings
# ============================================
# Required if APP_TYPE=backend
PM2_APP_NAME=myapp
BACKEND_PORT=3000
# ============================================
# Frontend-specific Settings (Optional)
# ============================================
# Domain name for Caddy configuration
# Leave empty to skip Caddy setup
DOMAIN=myapp.com
# ============================================
# Optional: Build Directory
# ============================================
# Frontend build output directory
# Default: auto-detect (dist, build, or public)
# BUILD_DIR=dist
# ============================================
# Optional: Environment File
# ============================================
# Local environment file to upload to server
# Default: .env
# ENV_FILE=.env.production
# ============================================
# Zero-Downtime Deployment
# ============================================
# Enable atomic release-based deployments with health checks
ZERO_DOWNTIME=true
# Number of releases to keep (older releases will be deleted)
KEEP_RELEASES=5
# ============================================
# Health Checks (Backend only)
# ============================================
# Enable health checks after deployment
HEALTH_CHECK_ENABLED=true
HEALTH_CHECK_PATH=/health
HEALTH_CHECK_TIMEOUT=30
HEALTH_CHECK_RETRIES=3
# ============================================
# Pre/Post Deploy Hooks
# ============================================
# ShipNode automatically uses .shipnode/pre-deploy.sh and .shipnode/post-deploy.sh
# if they exist. Run 'shipnode init' to auto-generate these with ORM-specific
# migration commands based on your package.json dependencies.
#
# Pre-deploy hook: Runs after code is deployed and dependencies installed,
# but BEFORE the new release is activated. If this hook fails, the
# deployment is aborted and rolled back.
# Use for: database migrations, Prisma generate, cache warming
#
# Post-deploy hook: Runs after the deployment completes successfully.
# If this hook fails, a warning is logged but the deployment is still
# considered successful.
# Use for: notifications, cache clearing, cleanup tasks
#
# Environment variables available to hooks:
# RELEASE_PATH - Path to the release being deployed
# REMOTE_PATH - Base deployment path on server
# PM2_APP_NAME - PM2 process name (backend only)
# BACKEND_PORT - Application port (backend only)
# SHARED_ENV_PATH - Path to shared .env file
#
# Advanced: Override default hook paths (rarely needed)
# PRE_DEPLOY_SCRIPT=.shipnode/pre-deploy.sh
# POST_DEPLOY_SCRIPT=.shipnode/post-deploy.sh
# ============================================
# Database and Redis Setup
# ============================================
# Enable database installation and setup
DB_SETUP_ENABLED=false
# Database type: postgresql, mysql, or sqlite
DB_TYPE=postgresql
# Database name/user/password for PostgreSQL or MySQL
DB_NAME=myapp_db
DB_USER=myapp_user
# You can reference .env variables directly:
# DB_PASSWORD=$DB_PASSWORD
# Or use defaults: DB_PASSWORD=${DB_PASSWORD:-fallback_value}
DB_PASSWORD=${DB_PASSWORD:-}
# SQLite database path. Defaults to $REMOTE_PATH/shared/database.sqlite
# DB_SQLITE_PATH=/var/www/myapp/shared/database.sqlite
# Enable Redis installation and localhost setup
REDIS_SETUP_ENABLED=false
# ============================================
# Database Backups to S3
# ============================================
# Enable scheduled database backups during setup
DB_BACKUP_ENABLED=false
# S3 bucket and optional prefix for uploaded backup files
# DB_BACKUP_S3_BUCKET=my-backups
# DB_BACKUP_S3_PREFIX=myapp
# Backup schedule: hourly, daily, weekly, or a systemd OnCalendar expression
# DB_BACKUP_SCHEDULE=daily
# Local compressed backup retention on the server
# DB_BACKUP_RETENTION_DAYS=14
# Optional S3-compatible endpoint (MinIO, R2, Spaces, etc.)
# DB_BACKUP_S3_ENDPOINT=
# AWS/S3 credentials. Prefer putting real values in .env and running shipnode env.
# AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-}
# AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-}
# AWS_DEFAULT_REGION=eu-west-1