Simple app to demonstrate using Docker to deploy Node.js app together with Nginx
touch .env && echo "NODE_PORT=3004" > ./.env
yarn install
yarn run dev
Open http://localhost:3004/api/hello
In this setup, all requests to server app are passed through nginx container "app_nginx" first. Nginx container is listening at port 8080.
yarn run docker:deploy
Open http://localhost:8080/api/hello
In this setup, server app is running as a standalone Docker container and exposes port 3004 to Docker host.
yarn run docker:build
yarn run docker:run
Re-build server app Docker image
Re-build all images