Web application built with Node.js, Express and Docker, Docker Compose.
-
Clone this repository
git clone git@github.com:FlorenceHC/example-docker-web-app cd example-docker-web-app
-
Run cluster in dev environment
docker-compose up
By default application in dev environment listens at
http://localhost:8080
-
Check cluster status
docker-compose ps
-
View logs
docker-compose logs
Optional
-f
flag, which follows newly generated logs, otherwise command will just print log and exit. Optional--tail <number>
flag, which will print last of lines. -
Tear down dev cluster
docker-compose down
-
Build deployable image
docker build -t example-docker-web-app .
-
Run built image
docker run -p 49160:8080 -d <your username>/node-web-app
In this example application listens at
http://localhost:49160