Skip to content

Docker container roles pattern for NestJS apps

Notifications You must be signed in to change notification settings

dkhorev/docker-container-roles-pattern-nestjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ae1f1a2 · Aug 27, 2022

History

12 Commits
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 27, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022
Aug 25, 2022

Repository files navigation

Demo: Docker container roles pattern for NestJS apps

This sample project demonstrates the usage of container role pattern when deploying NestJS apps.

See the full article here: https://medium.com/@dkhorev/docker-container-roles-pattern-for-nestjs-apps-ca8b07a08a9a

Starting the app

Install dependencies:
npm i

Pull Redis container:
docker pull redis:7-alpine

Build the application container:
DOCKER_BUILDKIT=1 docker build --pull -t role-app -f docker/app/Dockerfile .

Build nginx proxy container:
DOCKER_BUILDKIT=1 docker build --pull -t role-app-nginx -f docker/nginx/Dockerfile .

Start the stack:
docker-compose up -d

Stop the stack:
docker-compose down