/docker-mern

Build mern starter blog with docker in rancher

Primary LanguageJavaScriptMIT LicenseMIT

Docker MERN Starter Blog

This repo is forked from Hashnode/mern-starter, it can build with docker in rancher.

How To Build

Add Service

Add one service named db and select mongo:3 image, then add another service named mern and select tonypai/docker-mern image.

Port Map & Service Link

Create a service link to db service, then add a port map like this...

ENV Setting

Mern service needs to link mongodb or it will crash, so you can change the mongo url and web server port by setting environment variables.

MONGO_URL=mongodb://db:27017/mern
PORT=8000

Stack Graph

After you finish these steps, it should perfectly running on your server.