GithubHelp home page GithubHelp logo

arihant1467 / homerental Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 396 KB

HomeRental is a MERN stack app which I developed towards my learning for Distributed systems and containerization. Tech Stack: Reat, Node, MongoDB, MySQL, Kafka, JWT, REST, Docker,Heroku, Express

Home Page: https://homerental.herokuapp.com/

Dockerfile 0.33% HTML 0.88% CSS 8.46% JavaScript 87.65% Shell 2.68%
reactjs nodejs webpack docker mongodb express redux kafka dockerization rest

homerental's Introduction

HomeRental

HomeRental is a dockerized MERN stack app which I developed towards my learning for Distributed systems and dockerization of web apps https://homerental.herokuapp.com/

To launch the entire stack

This launches the services that make up the app so they can be run together in an isolated environment.

docker-compose up -d

Open the app at http://localhost:3000

To down the entire stack

docker-compose down

To re-run the containers that have stopped

docker-compose up --no-recreate

To show running containers

docker-compose ps

More reference on usage of docker-compose cli here

To launch the containers individually

  • Create virtual docker network

    docker network create homerental
    
  • MongoDB

    docker run -d --name MONGODB_CONTAINER_NAME \
      --network=homerental \
      -p 27017:27017 \
        -e MONGO_INITDB_ROOT_USERNAME=MONGODB_USERNAME \
      -e MONGO_INITDB_ROOT_PASSWORD=MONGODB_PASSWORD \
      mongo
    
  • Backend

    docker build -t homerental-backend -f ./homerental-backend/Dockerfile ./homerental-backend/.
    docker run -d --name homerental-backend \
      --network=homerental \
      -p 3500:3500 \
        -e MONGODB_USERNAME=USERNAME_OF_MONGODB \
        -e MONGODB_PASSWORD=PASSWORD_OF_MONGODB \
      -e MONGODB_HOST=HOSTNAME_WHERE_MONGODB_LISTENING \
      -e MONGODB_PORT=PORT_WHERE_MONGODB_LISTENING \
      -e AUTHENTICATING_DATABASE=DB_NAME_WHERE_CREDENTIALS_NEED_TO_AUTHENTICATE \
      -e WAIT_HOSTS=HOST:PORT of MongoDB to make a connection before starting the server
      homerental-backend
    
  • Frontend

    docker build -t homerental-frontend -f ./homerental-frontend/Dockerfile ./homerental-frontend/.
    docker run -d --name homerental-frontend \
      --network=homerental \
      -p 3000:3000 \
      -e PROXY_HOST=BACKEND_HOSTNAME \
      -e PROXY_PORT=BACKEND_HOST_PORT \
      homerental-frontend
    
  • Launch the website

    firefox http://HOST_NAME:3000
    chrome http://HOST_NAME:3000
    

homerental's People

Contributors

arihant1467 avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 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.