Skip to content

[Feature] Automated Multi-Service Deployment with Docker Compose and Production-Ready CI/CD Pipeline#99

Open
GaneshPatil7517 wants to merge 2 commits intohyphae:add-license-1from
GaneshPatil7517:feature/docker-compose-cicd-pipeline
Open

[Feature] Automated Multi-Service Deployment with Docker Compose and Production-Ready CI/CD Pipeline#99
GaneshPatil7517 wants to merge 2 commits intohyphae:add-license-1from
GaneshPatil7517:feature/docker-compose-cicd-pipeline

Conversation

@GaneshPatil7517
Copy link
Copy Markdown

Adds reproducible Docker-based deployment, fixes the CI/CD pipeline, and standardizes the MongoDB port configuration. This resolves the key barrier for new contributors who currently must follow a 10+ step manual Docker setup.

Closes #98

Changes
Docker Compose Deployment

  • docker/Dockerfile - Multi-stage build (builder + runtime) that clones all sub-repos, builds Java services with Maven, sets up Python venvs, and produces a lean runtime image
  • docker-compose.yml- Orchestrates MongoDB 6.0 (with health checks) + APIS app service. Single command: docker compose up --build
  • docker/entrypoint.sh - Starts all 8 services (4x apis-main, apis-ccc, apis-log, apis-web, apis-emulator, apis-main_controller, apis-service_center, apis-tester) in correct order
  • .dockerignore - Optimizes build context by excluding .git, docs, IDE files

CI/CD Pipeline Fixes

  • Retargeted workflow triggers to include main branch (was only add-license-1)
  • Upgraded runner from ubuntu-20.04 to ubuntu-22.04
  • Upgraded MongoDB from 4.0 (deprecated bionic repo) to 6.0 with proper GPG key
  • Replaced individual apt install with single apt-get install -y call
  • Added post-deployment health checks - validates HTTP 200 on ports 4382, 4390, 10000, 8000
  • Added if: always() on stop step to ensure cleanup on failure

MongoDB Port Standardization

  • Changed mongodb/start.sh from port 27018 → 27017
  • Changed mongodb/stop.sh grep pattern from 27018 → 27017
  • Dockerfile auto-fixes apis-service_center-demo.py settings (27018 → 27017)

Documentation

  • Updated docs/INSTALL_DOCKER.md with Docker Compose quick start section
  • Added docs/DEVELOPMENT.md with architecture overview, build order, and troubleshooting

Testing
Tested locally with Docker on Windows:

  • MongoDB starts on port 27017 and is accessible (apis_demo database populated)
  • All 14 processes running (4x apis-main, apis-ccc, apis-log, apis-web, emulator, main_controller, service_center, tester, MongoDB)
  • HTTP 200 on all 4 web endpoints (4382, 4390, 10000, 8000)
  • Service Center admin panel accessible at /static/ui_example/staff/visual.html

Impact

Area Before After
New contributor setup Manual 10+ step Docker process Single docker compose up --build
Build reproducibility Opaque pre-built image Fully from-source Dockerfile in repo
CI/CD Wrong branch, no tests, deprecated MongoDB Runs on PRs with health validation
MongoDB port Inconsistent (27018 in scripts, 27017 in docs) Standardized to 27017 everywhere

Copilot AI review requested due to automatic review settings April 13, 2026 03:35
…dardize MongoDB port

- Add multi-stage Dockerfile that builds all APIS services from source
- Add docker-compose.yml with MongoDB 6.0 service and health checks
- Add entrypoint.sh to orchestrate all service startup
- Add .dockerignore to optimize Docker build context
- Fix CI workflow: target main branch, upgrade to ubuntu-22.04 and MongoDB 6.0
- Add post-deployment health checks to CI pipeline
- Standardize MongoDB port from 27018 to 27017 across start.sh and stop.sh
- Update docs/INSTALL_DOCKER.md with docker compose quick start
- Add docs/DEVELOPMENT.md with architecture overview and dev guide

Closes hyphae#98

Signed-off-by: Ganesh Patil <7030871503ganeshpatil@gmail.com>
@GaneshPatil7517 GaneshPatil7517 force-pushed the feature/docker-compose-cicd-pipeline branch from 29270e5 to 05b3992 Compare April 13, 2026 03:37
@GaneshPatil7517
Copy link
Copy Markdown
Author

GaneshPatil7517 commented Apr 13, 2026

hello @WillSams Sir and @AkarshSahlot Sir successfully created a PR for #98 and implemented all features the PR is ready to review........

Copy link
Copy Markdown

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

Adds a Docker Compose–based deployment path and updates CI and documentation to reduce contributor setup friction, while standardizing MongoDB to port 27017.

Changes:

  • Add multi-stage Docker image build plus a single-container entrypoint that starts all APIS services.
  • Add docker-compose.yml orchestration for MongoDB 6.0 + APIS container, and update docs with a Compose quick start + new development guide.
  • Fix CI triggers/runner version, upgrade CI MongoDB to 6.0, and add basic HTTP health probes; standardize MongoDB scripts to port 27017.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
mongodb/start.sh Switch MongoDB start port to 27017.
mongodb/stop.sh Update stop script’s port grep to 27017.
docker/Dockerfile New multi-stage build that clones/builds all sub-repos and produces a runtime image.
docker/entrypoint.sh New entrypoint that launches Java + Python services inside the APIS container.
docker-compose.yml New Compose stack for MongoDB + APIS container with healthcheck gating.
.github/workflows/makefile.yml CI now targets main, runs on ubuntu-22.04, installs MongoDB 6.0, and performs HTTP probes with cleanup on failure.
.dockerignore Reduce Docker build context by excluding VCS, docs, IDE files, and MongoDB data.
docs/INSTALL_DOCKER.md Add Compose “Quick Start” instructions and keep manual path as an alternative.
docs/DEVELOPMENT.md New contributor development guide including Compose commands and architecture overview.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- entrypoint.sh: switch from manage.py runserver to gunicorn for production
- entrypoint.sh: fix hyphenated settings module name to use underscores
- entrypoint.sh: add signal trapping (TERM/INT) and wait -n for proper shutdown
- Dockerfile: remove duplicate mongodb COPY layer
- Dockerfile: fix port-fix sed to check both underscore and hyphen settings filenames
- makefile.yml: replace sleep 30 with wait_for_url readiness loop
- makefile.yml: fail health check step if any of the 4 services is down

Signed-off-by: Ganesh Patil <7030871503ganeshpatil@gmail.com>
@GaneshPatil7517 GaneshPatil7517 force-pushed the feature/docker-compose-cicd-pipeline branch from 964161e to f997c55 Compare April 13, 2026 09: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.

[Feature] Automated Multi-Service Deployment with Docker Compose and Production-Ready CI/CD Pipeline

2 participants