Skip to content

[Feature]: Multicontainer Dockerization using Docker Compose (Client, Server, Bot) #246

@khushigoel44-afk

Description

@khushigoel44-afk

Problem

Currently, setting up GAMIFY locally requires a multi-step process where contributors must manually navigate to three separate directories (client/, server/, and bot/), run npm install in each, configure local environmental variables, and maintain three running terminal processes. This introduces onboarding friction, potential port conflicts, and OS-specific dependency issues for open-source contributors.

Proposed solution

Implement complete multi-container dockerization across the entire repository using Docker and Docker Compose. This will enable contributors to spin up the React frontend, Express API server, Discord bot service, and a local MongoDB instance simultaneously with a single command.
The required architecture should implement:

  1. Service Dockerfiles:
    • server/Dockerfile: Containerizes the Node.js/Express REST API.
    • client/Dockerfile: Multi-stage build that compiles the React application and serves it via an optimized Nginx container layer.
    • bot/Dockerfile: Configures an isolated Node.js environment optimized to sustain the running discord.js client listener.
  2. docker-compose.yml: A root-level orchestration configuration linking:
    • The backend API server container (mapping port 5000).
    • The web dashboard UI container (mapping Vite's dev/preview ports).
    • The Discord companion bot process wrapper.
    • A localized database layer (mongo:latest) with named persistent volumes to bypass immediate requirements for an external MongoDB Atlas connection string during testing.
  3. .dockerignore: To keep the build context highly performant by stripping local node_modules and build directories.
  4. Documentation: Appending step-by-step implementation notes to the README.md on how to launch the entire multi-service stack natively through Docker commands.

Additional context

  1. This update significantly streamlines local workflow management, lowering barriers for new open-source contributors who want to test frontend interactions alongside bot events in real-time.
  2. All configuration secrets inside the respective .env files will map safely and directly into the orchestrator blocks without security compromises.

I am a GSSoC Contributor and would love to work on this issue. Could you please assign it to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions