https://github.com/maharshmellow/docker-nodejs-tutorial
Simple nodejs docker repo that contains what is needed to run locally and run on a public cloud
https://github.com/maharshmellow/docker-nodejs-tutorial
Last synced: 3 months ago
JSON representation
Simple nodejs docker repo that contains what is needed to run locally and run on a public cloud
- Host: GitHub
- URL: https://github.com/maharshmellow/docker-nodejs-tutorial
- Owner: maharshmellow
- Created: 2019-12-21T00:48:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-21T01:13:45.000Z (over 5 years ago)
- Last Synced: 2025-01-14T14:13:40.432Z (4 months ago)
- Language: Dockerfile
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Setup (Local and DigitalOcean)
## Run locally
1) `cd` to the root directory of this repo
2) Build using `docker build -t maharshmellow/docker_nodejs_tutorial .`
3) Run using `docker run -p 49160:8080 -d maharshmellow/docker_nodejs_tutorial`
3) `docker ps` to get container name and status
4) Open `localhost:49160`
5) `docker stop `## Run on DigitalOcean
1) `docker push maharshmellow/docker_nodejs_tutorial`
2) Create a docker droplet from the marketplace
3) Log into the droplet
4) `docker system prune -a`
5) `docker pull maharshmellow/docker_nodejs_tutorial`
6) `docker run --name docker_nodejs_tutorial -p 80:8080 -d maharshmellow/docker_nodejs_tutorial`
7) Visit the Public URL
8) `docker stop docker_nodejs_tutorial`