Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/omjaju18/3-tier-application-docker

Three-tier Application
https://github.com/omjaju18/3-tier-application-docker

docker docker-compose docker-container docker-image dockerfile github jenkins jenkins-pipeline jenkins-plugin jenkinsfile

Last synced: 16 days ago
JSON representation

Three-tier Application

Awesome Lists containing this project

README

        

# A simple MERN stack application

### Create a network for the docker containers

`docker network create demo`

### Build the client

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

### Run the client

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

### Verify the client is running

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

### Run the mongodb container

`docker run --network=demo --name mongodb -d -p 27017:27017 -v ~/opt/data:/data/db mongodb:latest`

### Build the server

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

### Run the server

`docker run --name=backend --network=demo -d -p 5050:5050 mern-backend`

## Using Docker Compose

`docker compose up -d`

## Outputs

image

image

image

image

kind create cluster --image kindest/node:v1.29.10@sha256:3b2d8c31753e6c8069d4fc4517264cd20e86fd36220671fb7d0a5855103aa84b --name Ommie K8