Designed and implemented API endpoints for seamless data access on a Fauna database while concurrently gaining expertise in Docker and Kubernetes, with a primary focus on enhancing containerization and orchestration skills.
-
Clone the repo
git clone https://github.com/Devankit2022/FaunaDB-APIEndpoints.git
-
Install NPM packages
npm install
-
Run following command to see the website which runs on
localhost:3000
npm run dev
-
Install Docker following this documentation
-
Create an account on Docker Hub
-
Start Docker Desktop App
-
You need my
FAUNA_SECRET_KEY
, so mail me at[email protected]
-
Open terminal and run
docker run --name my-container -e FAUNA_SECRET_KEY=env-varible -p 3000:3000 -d devankit2022/devankit-faundadb-api:0.0.2.RELEASE
-
OR Open terminal and
cd
to project root directory and rundocker compose -f compose.yaml up
-
Website will be live at
localhost:3000
-
Install kubectl following this documentation
-
Install minikube following this documentation
-
Open terminal and run
minikube start
-
Open terminal and
cd
to to project root directory and run the following commandskubectl apply -f .\kubernetes\secret.yaml kubectl apply -f .\kubernetes\config.yaml kubectl apply -f .\kubernetes\deployment.yaml kubectl apply -f .\kubernetes\service.yaml
-
To view the website on localhost, run
minikube service api-service
Deploy it on Render