Skip to content

Conversation

@Nishim12
Copy link
Contributor

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

  • Added a step to upload the new certbot-renewal-with-nginx-reload.sh script during both production and staging deployments, ensuring automated certificate renewal and nginx reload.

Service Reliability Enhancements

  • Introduced health checks for memcached, django, and nginx services in docker-compose.yml to automatically detect and recover from failures, preventing silent deployment of broken configurations.
  • Added restart policies and improved update/rollback strategies for django, nginx, and certbot services, ensuring services recover from failures and roll back on unsuccessful updates.

Copy link
Contributor

Copilot AI left a 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.

Copy link

Copilot AI commented Nov 25, 2025

@Nishim12 I've opened a new pull request, #1683, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Nov 25, 2025

@Nishim12 I've opened a new pull request, #1684, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Member

@psiemens psiemens left a 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.

on:
push:
branches:
- new-deployment-strategy
Copy link
Member

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.

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice script!

@Nishim12 Nishim12 merged commit a0b4ccf into develop Nov 28, 2025
4 of 6 checks passed
@Nishim12 Nishim12 deleted the new-deployment-strategy branch November 28, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants