Here is a guide on how to run and build, and scale this project!
First, you need a image for the website.
navigate to website
folder in termial
cd website
then build docker image
docker build -t website .
Ops remember to change the image name in the docker-compose
file if you name it something else then website
navigate back to root and run
doceker compose up
Now you are running on localhost:5000
(frontend) and localhost:5001
(backend)
Docker Swarm or Kubernetes
To scale the backend(fast_api) you need to add
deploy:
replicas: x
where x
is the amount of instances of the service are running across the cluster. Place this under cad-aid-api in docker compose. a reverse proxy, like nginx, is needed to make this work. This support many services/machines to access access the same port.
Deployment thoughts: Add the containers in kubernetes or docker swarn. might be fun to test more microservice architecture, like putting AI models in different docker containers.