This repository provides an easy way to test the GC-AI application locally using Docker. Anyone interested in running the project on their machine can follow these simple steps.
Before getting started, make sure you have installed:
- Docker 🐳
- Docker Compose (already included in Docker Desktop)
You can check if Docker is installed by running:
docker --versionAnd for Docker Compose:
docker compose versionClone the repository or download the docker-compose.yml file into a local folder:
-
Using SSH:
git clone git@github.com:cvtalrc/GC-AI-environment.git cd GC-AI-environment -
Using HTTPS (no SSH key required):
git clone https://github.com/cvtalrc/GC-AI-environment.git cd GC-AI-environment
In the same folder where docker-compose.yml is located, run:
docker compose up -dThis will download the necessary images and start the services automatically.
🚨 Important: After running the above command, please wait at least 5 minutes before using the application to ensure the database and model are fully loaded. This helps prevent potential connection or initialization errors. Additionally, once you access the homepage, it is normal for the page to take approximately 10 seconds to load. This delay is expected and occurs due to the system being in test mode.
Once the containers are running, you can access:
- Frontend: http://localhost:8081
- Backend API: http://localhost:5001
- Database: MySQL will be available on port
3307(userroot, passwordigemparts2024).
If you experience issues due to port conflicts, follow these steps:
Run the following command to see which process is using a specific port:
netstat -tulnp | grep :<PORT> # Linux
lsof -i :<PORT> # macOS
netstat -ano | findstr :<PORT> # WindowsReplace <PORT> with the port number causing the conflict (e.g., 5001, 8081, or 3307).
Once you identify the process ID (PID), terminate it with:
kill -9 <PID> # Linux/macOS
taskkill /PID <PID> /F # WindowsReplace <PID> with the actual process ID.
-
To change the frontend port, modify the following line in
docker-compose.yml:ports: - "8082:80" # Change 8081 to another available port
-
To change the database port, modify these lines:
ports: - "3308:3306" # Change 3307 to another available port
🚨 The backend must remain on port 5001, as it is preconfigured to use this port. Do not change it.
To stop the services, use:
docker compose downTo also remove volumes and the database:
docker compose down -v- No manual configuration is required—everything is ready to run with Docker.
- If you encounter any issues, try restarting Docker and running the commands again.
- If a port conflict occurs, follow the steps above to free the port instead of changing it.