This project consists of a frontend (React/Vite) and a backend (FastAPI) application. This README provides instructions on how to set up and run the entire application using Docker Compose.
The easiest way to run the entire application is with Docker Compose.
- Install Docker Desktop for your operating system and ensure it is running.
-
Clone the repository.
-
Start the services: From the root directory of the project, run:
docker-compose up --build -d
This command will build the images for the frontend and backend services and start all the necessary containers in detached mode.
-
Seed the database: The backend service uses a MongoDB database. To populate it with initial data, run the following command after the services have started:
docker-compose exec backend python seed_db.py -
Access the application:
- Frontend application: http://localhost:8080
- Backend API: http://localhost:8001
- Mongo Express (database admin): http://localhost:8081
To stop all the services, run:
docker-compose downThe docker-compose.yml file defines the following services:
- frontend: The React/Vite frontend application.
- backend: The FastAPI backend application.
- mongodb: The MongoDB database.
- mongo-express: A web-based admin interface for MongoDB.
If you want to work only on the backend, you can use the docker-compose.yml file located in the backend directory. This will start the backend service along with the MongoDB database and Mongo Express.
- Navigate to the
backenddirectory:cd backend - Start the services:
docker-compose up --build -d
This setup uses a volume mount for the backend code, allowing for hot-reloading. Refer to backend/README.md for more details.