-
Notifications
You must be signed in to change notification settings - Fork 1
Deployment notes
📚 Complete Documentation: For comprehensive deployment procedures, infrastructure details, and backup/restore operations, see the CI/CD README in the main repository.
Staging deploys automatically when code is merged to main:
- GitHub Actions workflow: rebuild-staging.yaml
- No manual intervention required
- Check workflow status in GitHub Actions tab
Production requires manual trigger via GitHub Actions:
- Navigate to Actions → "Deploy to Production"
- Click "Run workflow"
- Type "DEPLOY" to confirm
- Workflow: deploy-production.yaml
If you need to deploy manually from your local machine:
cd ci
# Deploy to staging
make deploy ENV=staging RUN=manual-$(date +%Y%m%d)
# Deploy to production
make deploy ENV=production RUN=manual-$(date +%Y%m%d)Prerequisites:
- GCP authentication:
gcloud auth login - SSH access to the deployment VM
- Deployer SSH key configured
- Code Sync: rsync transfers code to VM (excludes files, vendor, local dev folders)
-
Config Deployment: Environment-specific files copied as
.new:-
settings.php.new(both environments) -
.htaccess.newandrobots.txt.new(staging only)
-
-
Cleanup Script: Runs on VM with sudo to:
- Move
.newfiles into place - Run
composer install - Rebuild Drupal cache (
drush cr) - Set proper file permissions (www-data:www-data, 775 for files)
- Move
Clear Drupal cache:
ssh [email protected]
~/production-drush.sh cr # Production
~/staging-drush.sh cr # StagingRun database updates:
ssh [email protected]
~/production-drush.sh updb -y # Production
~/staging-drush.sh updb -y # StagingCheck site status:
ssh [email protected]
~/production-drush.sh status
~/staging-drush.sh statusView logs:
ssh [email protected]
sudo tail -f /var/log/apache2/error.logAfter deployment, if you need immediate cache refresh:
# Invalidate specific paths
gcloud compute url-maps invalidate-cdn-cache interledger-org \
--path "/path/to/page" \
--async
# Invalidate all /developers content
gcloud compute url-maps invalidate-cdn-cache interledger-org \
--path "/developers/*" \
--asyncAlways backup production before major changes:
cd ci
make backup ENV=production RUN=pre-deploy-$(date +%Y%m%d-%H%M%S)See Backup and Restore documentation for more details.
Common workflow for production updates:
cd ci
# 1. Backup production (safety)
make backup ENV=production RUN=pre-promotion-$(date +%Y%m%d)
# 2. Backup staging (to be promoted)
make backup ENV=staging RUN=promotion-$(date +%Y%m%d)
# 3. Restore staging to production (database + files)
make restore ENV=staging FROM-RUN=promotion-$(date +%Y%m%d) TARGETENV=production
# 4. Deploy code via GitHub Actions
# Navigate to Actions → "Deploy to Production"Issue: Site showing old content
- Clear Drupal cache:
~/production-drush.sh cr - Invalidate CDN cache (see above)
- Check browser cache (hard refresh: Ctrl+Shift+R)
Issue: Permission errors
ssh [email protected]
sudo chown -R www-data:www-data /var/www/production/web/sites/default/files/
sudo chmod -R 775 /var/www/production/web/sites/default/files/Issue: White screen / 500 errors
ssh [email protected]
sudo tail -f /var/log/apache2/error.log
~/production-drush.sh status # Check database connectionIssue: Composer errors
ssh [email protected]
cd /var/www/production
composer install --no-dev --optimize-autoloaderAfter deploying, verify:
# Site loads
curl -I https://interledger.org/
# Developers portal loads
curl -I https://interledger.org/developers/
# Check backend health
gcloud compute backend-services get-health drupal-sites-backend --global
# Check Drupal status
ssh [email protected]
~/production-drush.sh statusIf you need to deploy but don't have access:
- Want a change implemented: Open a PR and ping someone in Community Slack
- ILF Tech Team: Contact the infrastructure team in the tech-team Slack channel
- Emergency: Check GitHub Actions for recent deployment status
- CI/CD README: Complete deployment documentation
- Infrastructure README: GCP architecture and operations
- Local Development: Setting up local environment
- Environments: Overview of local, staging, and production environments
- Home
- Recurring tasks
- Infrastructure & Deployment
- Local site development
- State of interledger.org
- One-time setup notes
- Managing Multilingual Support