A simple backend service for the Ark POC frontend project.
- Typescript
- Express
- Prisma
- Node and NPM
- Yarn
- Docker & Kubernetes
To get a local copy up and running follow these simple example steps.
-
Clone the repository
git clone https://github.com/thaboRach/ark-poc-api.git
-
Ensure you create a
.env
file with the following environment variablesPOSTGRES_USER=arkpoc POSTGRES_PASSWORD=supersecret POSTGRES_DB=arkpoc DATABASE_URL=postgres://arkpoc:supersecret@localhost:5432/arkpoc NODE_ENV=development
-
Start the container
docker compose up
Ensure you have postgresql installed on your machine.
npm install --global yarn
-
Install the required packages
yarn
-
Run the database migrations (This will allow the database to sync with the schema)
npx prisma migrate dev
Start the server locally:
yarn dev
Ensure you have installed Kind on your machine.
-
Create the cluster:
kind create cluster --config=./k8s/config.yaml
-
Use the cluster:
kubectl cluster-info --context kind-ark-poc-cluster
-
Apply the deployment configuration:
kubectl apply -f ./k8s/deployment.yaml
-
Check that the namespace has been created:
kubectl get namespaces
-
Set the namespace as the active
kubectl config set-context --current --namespace=ark-app-ns
-
Show the contexts:
kubectl config get-contexts
-
Check the status of your pods:
kubectl get pods
-
To stop and delete the cluster
kind delete cluster --name ark-poc-cluster