Skip to content

civilcoder55/incantogamus

Repository files navigation

(Incantogamus) Video Games API

Usage with docker

  1. Clone the repo

    git clone `https://github.com/civilcoder55/incantogamus.git`
  2. Change directory

    cd incantogamus
  3. update the env file with proper Leave it if you want, default values should work

    cp .env.example .env
  4. ensure run.sh is executable

    chmod +x run.sh
  5. Build images and run containers

    docker-compose up -d
  6. Create and Sync database (already run with container up)

    docker exec -it incantogamus-node npm run db:sync
  7. Access API at

    http://localhost:3000/v1/docs
  8. Access docker logs

    docker logs -f incantogamus-node
  9. To run test

    docker exec -it incantogamus-node npm run test

Deploy to kubernetes (miniKube)

  1. Clone the repo

    git clone `https://github.com/civilcoder55/incantogamus.git`
  2. Change directory

    cd incantogamus
  3. build the image

    eval $(minikube docker-env) # to use local docker image in minikube
    docker-compose build
  4. update the k8s/secrets.yaml file with proper values

  5. ensure run.sh is executable

    chmod +x run.sh
  6. Create k8s resources

    kubectl apply -f k8s
  7. get the minikube node ip

    minikube ip
  8. Add the ip to your hosts file

    echo "$(minikube ip) incantogamus.com" | sudo tee -a /etc/hosts
  9. Access API at

    http://incantogamus.com/health