-
Notifications
You must be signed in to change notification settings - Fork 41
New deployment strategy #1682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New deployment strategy #1682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enhances deployment reliability by introducing comprehensive health checks, automated rollback strategies, and improved TLS certificate management for both production and staging environments.
Key Changes:
- Added health checks for memcached, django, and nginx services with automatic failure detection and recovery
- Implemented rollback configurations for django and nginx services to revert failed deployments
- Automated TLS certificate renewal with nginx reload functionality through a dedicated certbot service script
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/sync-secrets.sh |
New script to synchronize secrets from Google Secret Manager to Docker secrets |
scripts/certbot-renewal-with-nginx-reload.sh |
New script that continuously monitors certificate renewals and reloads nginx after each check |
scripts/certbot-init.sh |
New initialization script for obtaining initial SSL certificates for production and staging domains |
docker-compose.yml |
Added health checks for memcached, django, and nginx; configured rollback strategies and restart policies; updated certbot service to use new renewal script with docker socket access |
.github/workflows/deploy-staging.yml |
Updated to upload certbot renewal script and corrected path for sync-secrets.sh script |
.github/workflows/deploy-production.yml |
Updated to upload certbot renewal script and corrected path for sync-secrets.sh script |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
psiemens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @Nishim12. Looks great overall. Just a few comments.
.github/workflows/deploy-staging.yml
Outdated
| on: | ||
| push: | ||
| branches: | ||
| - new-deployment-strategy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder to remove this before merging.
.github/workflows/deploy-staging.yml
Outdated
| deploy: | ||
| # Only run if the production build job was successful | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
| # Run on push to new-deployment-strategy branch OR if production build was successful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here!
| @@ -0,0 +1,33 @@ | |||
| #!/bin/sh | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice script!
This pull request introduces service reliability for both production and staging environments. The main changes include enhanced health checks for core services, added rollback strategies, automation of TLS certificate renewal with nginx reloads.
Deployment Workflow Improvements
certbot-renewal-with-nginx-reload.shscript during both production and staging deployments, ensuring automated certificate renewal and nginx reload.Service Reliability Enhancements
memcached,django, andnginxservices indocker-compose.ymlto automatically detect and recover from failures, preventing silent deployment of broken configurations.django,nginx, andcertbotservices, ensuring services recover from failures and roll back on unsuccessful updates.