Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 726 Bytes

README.md

File metadata and controls

35 lines (21 loc) · 726 Bytes

A simple MERN stack application

Create a network for the docker containers

docker network create mern_network

Build the client

cd ./frontend
docker build -t mern-frontend .

Run the client

docker run --name=frontend --network=mern_network -d -p 5173:5173 mern-frontend

Verify the client is running

Open your browser and type http://localhost:5173

Build the server

cd ./backend
docker build -t mern-backend .

| USE NEEDFUL .env FILE

Run the server

docker run --name=backend --network=mern_network -d -p 4000:4000 -v /home/$(whoami)/.env:/app/.env mern-backend