Skip to content

Commit

Permalink
fix: update README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
gobeam committed Jan 16, 2022
1 parent d2075ad commit b65a5d2
Show file tree
Hide file tree
Showing 11 changed files with 356 additions and 99 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SERVER_PORT=7777
DB_PASSWORD=truthy
DB_USERNAME=truthy123
DB_DATABASE_NAME=truthy
DB_PORT=5432
REDIS_PORT=6399
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Call function '...'
2. Pass value '...'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
49 changes: 17 additions & 32 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,33 @@
FROM node:12-alpine AS BUILD_IMAGE

# couchbase sdk requirements
RUN apk update && apk add yarn curl bash python g++ make && rm -rf /var/cache/apk/*

# install node-prune (https://github.com/tj/node-prune)
RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash -s -- -b /usr/local/bin
FROM node:14-alpine As development

WORKDIR /usr/src/app

COPY package.json yarn.lock ./
# COPY package*.json ./
COPY package.json ./

# install dependencies
RUN yarn --frozen-lockfile
COPY yarn.lock ./

COPY . .
RUN yarn install

# lint & test
#RUN yarn test
COPY . .

# build application
RUN yarn build

# remove development dependencies
RUN npm prune --production
FROM node:14-alpine As production

# run node prune
RUN /usr/local/bin/node-prune
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}

# remove unused dependencies
RUN rm -rf node_modules/rxjs/src/
RUN rm -rf node_modules/rxjs/bundles/
RUN rm -rf node_modules/rxjs/_esm5/
RUN rm -rf node_modules/rxjs/_esm2015/
RUN rm -rf node_modules/swagger-ui-dist/*.map
RUN rm -rf node_modules/couchbase/src/
WORKDIR /usr/src/app

FROM node:12-alpine
COPY package.json ./

WORKDIR /usr/src/app
COPY yarn.lock ./

# copy from build image
COPY --from=BUILD_IMAGE /usr/src/app/dist ./dist
COPY --from=BUILD_IMAGE /usr/src/app/node_modules ./node_modules
RUN yarn install --production

COPY . .

EXPOSE 3030
COPY --from=development /usr/src/app/dist ./dist

CMD [ "node", "./dist/Main.js" ]
CMD ["node", "dist/main"]
11 changes: 11 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:14-alpine As development

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install --only=development

COPY . .

RUN npm run start:dev
Loading

0 comments on commit b65a5d2

Please sign in to comment.