This guide will help you set up and run the BrainBoost application on your computer using Docker. The application consists of three services: Backend (Spring Boot), Frontend (Angular), and PostgreSQL (database).
Ensure the following tools are installed on your computer:
- Docker: Install Docker
- Docker Compose: Comes pre-installed with Docker Desktop.
The project is structured as follows:
BrainBoostBackend/
├── BrainBoostFrontend/
│ └── Dockerfile
├── docker-compose.yml
└── Dockerfile
-
Clone the Repository
Clone the project repository to your local machine:git clone <repository-url> cd project-root
-
Build the Docker Images
Build the Docker images for all services:docker-compose build
-
Start the Application
Run the following command to start all services:docker-compose up
-
Access the Application
- Frontend: Open your browser and navigate to
http://localhost - Backend: Accessible at
http://localhost:8080 - PostgreSQL: Database runs on
localhost:5432(if needed)
- Frontend: Open your browser and navigate to
-
If you encounter any issues, check the logs for each service:
docker-compose logs <service-name>
Replace
<service-name>withfrontend,backend, ordb. -
Ensure ports
80,8080, and5432are not in use by other applications.
To stop the application, press Ctrl+C in the terminal where docker-compose up is running. Then, remove the containers:
docker-compose down