All Projects → denpalrius → docker-nestjs-starter

denpalrius / docker-nestjs-starter

Licence: other
NestJs app with Docker

Programming Languages

typescript
32286 projects
Dockerfile
14818 projects
Slim
82 projects

Projects that are alternatives of or similar to docker-nestjs-starter

postgres-nest-react-typescript-boilerplate
No description or website provided.
Stars: ✭ 93 (+43.08%)
Mutual labels:  nestjs
prisma-generator-nestjs-dto
Generates NestJS DTO classes from Prisma Schema
Stars: ✭ 124 (+90.77%)
Mutual labels:  nestjs
Task-Card-Creator
Small tool for printing task cards used for a Scrum board. Your physical Scrum board will look fantastic. Supports Team Foundation Server and Azure DevOps.
Stars: ✭ 25 (-61.54%)
Mutual labels:  azure-devops
terraform-tuesdays
Demo files for various Terraform Tuesday Examples
Stars: ✭ 211 (+224.62%)
Mutual labels:  azure-devops
VstsExtensions
Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
Stars: ✭ 42 (-35.38%)
Mutual labels:  azure-devops
pipeline templates
Templates for use in build and release pipelines
Stars: ✭ 42 (-35.38%)
Mutual labels:  azure-devops
vsts-mirror-git-repository
A straightforward utility to mirror one Git repository to another location
Stars: ✭ 22 (-66.15%)
Mutual labels:  azure-devops
nestjs-toolbox
The repository contains a suite of components and modules for Nest.js
Stars: ✭ 166 (+155.38%)
Mutual labels:  nestjs
web07-boostCam
🎥캠 기능이 들어간 웹 메신저 서비스🎥
Stars: ✭ 16 (-75.38%)
Mutual labels:  nestjs
axios
Axios module for Nest framework (node.js) 🗂
Stars: ✭ 95 (+46.15%)
Mutual labels:  nestjs
kanban-project-management
Web Application to manage software development projects.
Stars: ✭ 39 (-40%)
Mutual labels:  nestjs
bad-cards-game
Bad Cards Game
Stars: ✭ 23 (-64.62%)
Mutual labels:  nestjs
Nestjs-Typeorm-Auth
NestJS + Typeorm codebase containing a full authentification system with roles, sessions and email verification.
Stars: ✭ 37 (-43.08%)
Mutual labels:  nestjs
nest-todo
🐱 使用 React.js + Nest.js 实现一个简单的 Todo App。
Stars: ✭ 205 (+215.38%)
Mutual labels:  nestjs
nestjs-file-streaming
NestJS File Streaming With MongoDB
Stars: ✭ 28 (-56.92%)
Mutual labels:  nestjs
necord
🤖 A module for creating Discord bots using NestJS, based on Discord.js
Stars: ✭ 77 (+18.46%)
Mutual labels:  nestjs
dependabot-azure-devops
Convenience tool for updating dependencies in Azure DevOps repositories using https://dependabot.com
Stars: ✭ 62 (-4.62%)
Mutual labels:  azure-devops
teanjs
🔥 TypeORM - Express - Angular 8 - NestJS Server Side Rendering (SSR) 😺
Stars: ✭ 62 (-4.62%)
Mutual labels:  nestjs
nodejs-postgresql-azure
Repositório responsável pela série de artigos sobre Node.js com PostgreSQL
Stars: ✭ 70 (+7.69%)
Mutual labels:  azure-devops
shellops-api
Shellops API ( NestJS ). Assists in managing Docker on your server.
Stars: ✭ 17 (-73.85%)
Mutual labels:  nestjs

Runnig NestJs in a Docker Container

This is a Nest Js project configured for use with Docker

Installation

$ npm install

Ensure also that Docker is installed on your work station

Running the app using node server (the normal way)

# development
$ npm run start:dev
or
nest start

# Debug/watch
$ npm run start:debug

# production
$ npm run build:prod
$ npm start

Setting up the app for use with Docker

  1. Add Dockerfile
  2. Add docker-compose.yml
  3. Add unnecessary files to .gitignore
  4. Add .dockerignore and include the unnecessary files
  5. Add nodemon-docker-debug.json
  6. Add "debug": "nodemon -L --config nodemon-docker-debug.json" script to package.json
  7. Configure VS Code for debugging the node js app with a container

Using Docker

# Build the image
$ docker build -t docker-nest-js:v1.0 .

# Run the image interactively
$ docker run -it -p 3000:3000 docker-nest-js:v1.0

Using Docker Compose

# Build the docker image
$ docker-compose build

# Start and login to the container
$ docker-compose up -d
$ docker-compose exec app sh

Other useful Docker commands

# Get the container ID
$ docker ps

# View logs
$ docker logs <container id>

# Enter the container (In alpine, use sh because bash is not installed by default)
$ docker exec -it <container id> /bin/sh

Testing

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Resources

Tutorial: https://qiita.com/rema424/items/36475ea7379e0d9c5972
Best practices: https://github.com/docker/docker-bench-security

License

MIT licensed

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].