-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚀 feat(boiler) : add docker image , compose , husky
- Loading branch information
Showing
7 changed files
with
881 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
|
||
{ | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"htmlWhitespaceSensitivity": "css", | ||
"insertPragma": false, | ||
"jsxBracketSameLine": false, | ||
"jsxSingleQuote": false, | ||
"printWidth": 80, | ||
"proseWrap": "preserve", | ||
"quoteProps": "as-needed", | ||
"requirePragma": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} | ||
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Step 1 | ||
## base image for Step 1: Node 14 | ||
FROM node:14 AS builder | ||
WORKDIR /app | ||
## 프로젝트의 모든 파일을 WORKDIR(/app)로 복사한다 | ||
COPY . . | ||
## Nest.js project를 build 한다 | ||
RUN npm install | ||
RUN npm run build | ||
|
||
|
||
# Step 2 | ||
## base image for Step 2: Node 14-alpine(light weight) | ||
FROM node:14-alpine | ||
WORKDIR /app | ||
## Step 1의 builder에서 build된 프로젝트를 가져온다 | ||
COPY --from=builder /app ./ | ||
## application 실행 | ||
CMD ["npm", "run", "start:prod"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3.7' | ||
services: | ||
redis: | ||
image: 'redis:alpine' | ||
ports: | ||
- '6379:6379' | ||
postgres: | ||
image: postgres:latest | ||
container_name: postgres | ||
restart: always | ||
ports: | ||
- '5432:5432' | ||
environment: | ||
POSTGRES_USER: 'gosrcok' | ||
POSTGRES_PASSWORD: 'gosrock' |
Oops, something went wrong.