Skip to content

Commit bae7191

Browse files
committed
Enhance documentation for CI/CD, debugging, deployment, and monitoring strategies
1 parent 7354150 commit bae7191

4 files changed

Lines changed: 38 additions & 13 deletions

File tree

docs/cicd.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,10 @@ If any step fails, the PR cannot be safely merged.
1919
- Deployment happens via SSH into Azure VM
2020
- Docker container is rebuilt and restarted
2121

22-
This ensures continuous delivery with minimal manual intervention.
22+
This ensures continuous delivery with minimal manual intervention.
23+
24+
25+
### Deployment Safety Controls
26+
27+
- Docker image is built and container health endpoint is validated during CI stage.
28+
- SSH based deployment ensures immutable infrastructure pattern where container is recreated on each release.

docs/debugging.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
## Production Deployment Failure Debugging Approach
22

33
If production deployment fails after merge:
4-
5-
1. Check GitHub Actions logs to identify failing stage
6-
2. SSH into Azure VM
7-
3. Verify Docker container status using `docker ps`
8-
4. Check container logs using `docker logs`
9-
5. Validate environment variables and port bindings
10-
6. Test application health endpoint locally inside VM
11-
7. Rollback to last working commit using `git revert`
12-
8. Rebuild Docker image and restart container
13-
9. Monitor logs after redeployment
4+
1. Identify blast radius — confirm whether issue affects staging or production only.
5+
2. Check GitHub Actions logs to identify failing stage
6+
3. SSH into Azure VM
7+
4. Verify Docker container status using `docker ps`
8+
5. Check container logs using `docker logs`
9+
6. Validate environment variables and port bindings
10+
7. Test application health endpoint locally inside VM
11+
8. Rollback to last working commit using `git revert`
12+
9. Rebuild Docker image and restart container
13+
10. Monitor logs after redeployment
1414

1515
This structured approach minimizes downtime and ensures faster recovery.

docs/deployment.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,17 @@ If deployment fails:
2626
- Previous commit can be reverted
2727
- Older Docker image can be redeployed
2828
- Container can be restarted with previous tag
29-
- GitHub Actions workflow can be re-run
29+
- GitHub Actions workflow can be re-run
30+
31+
### Container Versioning Strategy
32+
33+
Each deployment can optionally tag Docker images using commit SHA.
34+
This enables deterministic rollback by redeploying a previous image tag.
35+
36+
### Runtime Architecture
37+
38+
- Single Azure VM hosts two isolated Docker containers.
39+
- Production container binds to port 8000.
40+
- Staging container binds to port 8001.
41+
- Nginx acts as reverse proxy routing external traffic.
42+
- CI pipeline performs remote deployment via SSH automation.

docs/monitoring.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@
3333

3434
- GitHub Secrets
3535
- Azure Key Vault
36-
- Avoid storing secrets in codebase
36+
- Avoid storing secrets in codebase
37+
38+
### Metrics and Alerting
39+
40+
- CPU and memory utilization can be monitored via Azure Monitor.
41+
- Health endpoint failure alerts can be configured.
42+
- Log aggregation systems such as ELK / Datadog can provide anomaly detection.

0 commit comments

Comments
 (0)