Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ops-gaurav/node-app-docker
A simple node JS project using docker
https://github.com/ops-gaurav/node-app-docker
Last synced: 23 days ago
JSON representation
A simple node JS project using docker
- Host: GitHub
- URL: https://github.com/ops-gaurav/node-app-docker
- Owner: ops-gaurav
- Created: 2017-07-05T19:50:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T04:37:08.000Z (over 7 years ago)
- Last Synced: 2024-10-24T09:17:24.296Z (2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Configuring Docker Node project #
This is a simple hello world project developed to demonstrate how to create nodeJS images in docker.
### Prerequisite installations ###
* Install docker by following instructions from here [https://www.docker.com/get-docker](https://www.docker.com/get-docker)
* Docker hub/ Docker Cloud account
* Cloud service (e.g AWS, DigitalOcean etc.)### How do I get set up? ###
* Clone this repo using
```
git clone https://[email protected]/sharma02gaurav/node-app-docker.git
```* switch to node-app-docker folder
* Run the following command to build the Image
```
docker build -t [your-image-name] .
```
This will build the image for you.
* Now you can run this image locally using
```
docker run -p [access-port]:[redirect-port] [your-image-name]
```* You have to push this image into docker cloud using the following command. Make sure you have the docker account.
```
docker tags [your-image-name]:[label] [docker-user-name]/[repo-name]
docker push [docker-user-name]/[repo-name]
```### Deployment Instructions ###
* Create DigitalOcean account. Use referral account to get 10$ credit. Here is mine [Sign up using this to get 10$ credit on Digital Ocean](https://m.do.co/c/3a65d5a3f890)
* Create a Docker droplet.
* Log into Docker from terminal using ssh.
* Run following command to start image in container
```
docker run -p [incoming-port]:[redirect-port] [docker-user-name]/[repo-name]
```
for example```
docker run -p 80:4300 sharma02gaurav/my-node-app
```