GithubHelp home page GithubHelp logo

sujaykundu777 / mern-docker Goto Github PK

View Code? Open in Web Editor NEW
97.0 5.0 64.0 2.36 MB

Jumpstart your MERN Full Stack App development :pilot:

Home Page: https://dev.to/sujaykundu777/utilizing-the-power-of-docker-while-building-mern-apps-using-mern-docker-4olb

Dockerfile 6.78% JavaScript 77.19% HTML 9.98% CSS 5.39% Shell 0.66%
docker docker-compose mern react mongodb express

mern-docker's Introduction

MERN-Docker - Starter for building MERN Apps using Docker

MERN DOCKER diagram

Prerequisites:

You must have Docker Installed in your System !

How to run the App :

Article - Tutorial

In Development Mode :

First copy the content of docker-compose-dev.yml to docker-compose.yml

and also copy the content of server/src/index.dev.js to server/src/index.js

Run the app using :

$ docker-compose up --build --remove-orphans

or

$ docker-compose up -d

Above command will start the services on (-d) detach mode (similar like running the app in background)

Then you can check the status of the containers by running:

$ docker ps

The App should be App :

visit client : http://localhost:3000

visit server : http://localhost:8080

To check the status of the running containers :

docker-compose ps

In Production Mode :

First copy the content of docker-compose-prod.yml to docker-compose.yml

and also copy the content of server/src/index.prod.js to server/src/index.js

Run the app using :

$ docker-compose up --build -remove-orphans

The App should be up at http://localhost:8080

Build the image for server :

docker build -t myapp-server:1 . docker images docker run --name "myapp-server" -p 80:8080 myapp-server:1 docker ps

mern-docker's People

Contributors

dependabot[bot] avatar sujaykundu777 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.