This is a very simple, bare-bones NodeJS and ExpressJS project created.
- Install dependencies:
npm install
- Run server:
node server.js
By default, the application should be loaded on localhost:8080
. It should provide an HTTP 200 response when loaded at localhost:8080/health
.
- Build image:
docker build .
- Run container with image:
docker run {image_id}
whereimage_id
can be retrieved by runningdocker images
and found under the columnIMAGE ID
- TravisCI was useed in continous integration. image was built and pushed to docker registry Docker Hub, where it is pulled by AWS EKS, to set up pods in K8S services.
- The reverse proxy file is another pod set up to proxy url addresse.
- Nginx server was used for proxy.
- Kubectl was used to intreact with K8S.
Sample bare-bones nginx.conf
file
}
http {
server {
listen <PORT_NUMBER>;
location /<PROXY_PATH>/ {
proxy_pass http://<REDIRECT_PATH>/;
}
}
}