This document provides instructions for running the AI English Tutor application using Docker.
- Docker and Docker Compose installed on your system
- Git (to clone the repository)
- Navigate to the project root directory:
cd ai-english-tutor
- Build and start the containers:
docker-compose up -d
This will:
- Build the Docker image for the application
- Start the application container
- Start a MongoDB container
- Set up the necessary network connections between containers
- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:9000
To stop the running containers:
docker-compose down
To stop the containers and remove the volumes (this will delete the database data):
docker-compose down -v
The setup includes:
- Frontend: React application running on port 3000
- Backend: FastAPI application running on port 9000
- Database: MongoDB running on port 27017
You can customize the application by modifying the environment variables in the docker-compose.yml
file:
MONGODB_URI
: MongoDB connection stringJWT_SECRET
: Secret key for JWT token generation
If you want to build the Docker image manually:
docker build -t ai-english-tutor .
To run the container manually:
docker run -p 3000:3000 -p 9000:9000 --env MONGODB_URI=mongodb://mongo:27017 --env JWT_SECRET=your-secret-key ai-english-tutor
-
If you encounter connection issues with MongoDB, ensure the MongoDB container is running:
docker ps
-
To view logs from the application:
docker-compose logs app
-
To view logs from MongoDB:
docker-compose logs mongo