This docker image is for dockerizing MEAN stack app. This image is only for educational purpose.In order to run this docker image locally follow the below steps:
- First we need to run mongoDB:
docker run -p 27017:27017 -d --name db mongo
Run docker Image:
docker run -p 3000:3000 --link db:db_1 tavishagg/meanstack
We can use docker compose file to run with single command.
In order to run both containers from single command:
- Create a file named docker-compose.yml
- Paste the content into the file: https://github.com/tavishaggarwal/DockerMEANApp/blob/master/docker-compose.yml
- Go to directory containing the above file using terminal/powershell/command prompt.
- Run command docker-compose up
- Open http://localhost:3000 and application is up and running
Code for the image : https://github.com/tavishaggarwal/DockerMEANApp