Deployment Methods
Safe Settings supports multiple deployment options:- Docker - Containerized deployment for local or cloud environments
- AWS Lambda - Serverless deployment with automatic scaling
- Kubernetes - Production-grade orchestration with Helm charts
- GitHub Actions - Scheduled sync operations without infrastructure
Prerequisites
Before deploying Safe Settings, ensure you have:- GitHub App created with proper permissions
- Node.js 18.x or later (Node.js 20.x LTS recommended)
- Environment variables configured
- Admin repository set up in your organization
Required Environment Variables
All deployment methods require these core environment variables:PRIVATE_KEY takes precedence over PRIVATE_KEY_PATH. Use PRIVATE_KEY (base64 encoded) for containerized deployments.Core Variables
| Variable | Description | Required |
|---|---|---|
APP_ID | GitHub App ID from app settings page | Yes |
WEBHOOK_SECRET | Webhook secret generated during app creation | Yes |
PRIVATE_KEY | Base64 encoded private key contents | Yes* |
PRIVATE_KEY_PATH | Path to private key file | Yes* |
PRIVATE_KEY or PRIVATE_KEY_PATH is required
Optional Variables
| Variable | Description | Default |
|---|---|---|
ADMIN_REPO | Repository containing configuration files | admin |
CONFIG_PATH | Path to configuration directory | .github |
SETTINGS_FILE_PATH | Settings file name | settings.yml |
DEPLOYMENT_CONFIG_FILE | Deployment settings file path | deployment-settings.yml |
LOG_LEVEL | Logging level (trace, debug, info, warn, error) | info |
CRON | Cron schedule for periodic sync | - |
ENABLE_PR_COMMENT | Enable PR comments with validation results | true |
BLOCK_REPO_RENAME_BY_HUMAN | Block manual repository renaming | false |
GHE_HOST | GitHub Enterprise Server hostname | - |
GH_ORG | Organization name for manifest flow setup | - |
WEBHOOK_PROXY_URL | SMEE URL for local testing | - |
NODE_TLS_REJECT_UNAUTHORIZED | Disable SSL validation (use with caution) | 1 |
Environment-Specific Variables
GitHub Enterprise Server
Scheduled Sync
Local Development
Deployment Checklist
Before deploying, ensure you’ve completed these steps:Deployment Architecture
Safe Settings can be deployed in two modes:Webhook Mode
Responds to GitHub webhook events in real-time:- Repository created
- Settings modified
- Branch protection changed
- Pull requests opened
Scheduled Mode
Runs on a schedule to prevent configuration drift:- Periodic sync using CRON
- AWS Lambda with EventBridge
- GitHub Actions scheduled workflow
For production deployments, use both webhook and scheduled modes to ensure settings are always in sync.
Next Steps
Choose your deployment method:Docker
Quick containerized deployment
AWS Lambda
Serverless with auto-scaling
Kubernetes
Production orchestration
GitHub Actions
No infrastructure required
Support
For deployment issues:- Check the logs with
LOG_LEVEL=debug - Verify environment variables are set correctly
- Ensure GitHub App has proper permissions
- Review webhook delivery in GitHub App settings