Milestone: Milestone 5: Infrastructure & Tools
Category: 5.1 Docker
Task: Set up Docker Compose to orchestrate the backend API and database services.
Description
This task involves creating a docker-compose.yml file to easily manage the orchestration of the backend API and the database container(s). Docker Compose will define and run multi-container Docker applications, simplifying the management and deployment of the backend API and its dependencies (MySQL).
Subtasks:
Technical Considerations:
- Make sure to include the necessary database container (e.g.,
postgres:latest, mysql:latest)
- Configure Docker Compose for multi-stage builds if required, ensuring production readiness
- Ensure proper volume setup for persistent data (database, application state)
- Verify network settings to ensure proper communication between containers
- Handle secrets like database passwords via
.env or Docker Secrets for production use
Acceptance Criteria:
Milestone: Milestone 5: Infrastructure & Tools
Category: 5.1 Docker
Task: Set up Docker Compose to orchestrate the backend API and database services.
Description
This task involves creating a
docker-compose.ymlfile to easily manage the orchestration of the backend API and the database container(s). Docker Compose will define and run multi-container Docker applications, simplifying the management and deployment of the backend API and its dependencies (MySQL).Subtasks:
docker-compose.ymlfile at the root of the projectDockerfilecreated in Dockerfile for backend API)app-network)5000, database on default ports)depends_onin Docker Compose).envfile for environment variables (e.g., database username/password, API keys) and use it with Docker Composedocker-compose up,docker-compose down)Technical Considerations:
postgres:latest,mysql:latest).envor Docker Secrets for production useAcceptance Criteria:
docker-compose.ymlfile is set up to run the backend API and database containersdocker-compose upcommand successfully spins up the services