Skip to content

Commit

Permalink
chore: skip type checking on docker build, suppress npm ci output
Browse files Browse the repository at this point in the history
  • Loading branch information
pmstss committed Aug 28, 2024
1 parent adb4bc5 commit b8b0298
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 22 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ WORKDIR /usr/src/app
COPY --chown=node:node package*.json ./
COPY --chown=node:node tsconfig.build.json ./
COPY --chown=node:node tsconfig.json ./
COPY --chown=node:node nest-cli.json ./
COPY --chown=node:node nest-cli.fast.json ./
COPY --chown=node:node .env ./
COPY --chown=node:node config ./config
COPY --chown=node:node keycloak ./keycloak
COPY --chown=node:node src ./src

RUN npm ci
RUN npm run build
ENV NPM_CONFIG_LOGLEVEL=error
RUN npm ci --no-audit
RUN npm run build:fast
RUN npm prune --production

# Copy and build client project
Expand All @@ -30,7 +31,7 @@ COPY --chown=node:node client/tsconfig.json ./client/tsconfig.json

ENV NODE_OPTIONS=--openssl-legacy-provider
ENV CYPRESS_INSTALL_BINARY=0
RUN npm ci --prefix=client
RUN npm ci --prefix=client --no-audit
RUN npm run build --prefix=client

USER node
Expand All @@ -43,7 +44,6 @@ FROM node:18-alpine AS production

WORKDIR /usr/src/app

COPY --chown=node:node nest-cli.json ./
COPY --chown=node:node .env ./
COPY --chown=node:node config ./config
COPY --chown=node:node keycloak ./keycloak
Expand Down
10 changes: 10 additions & 0 deletions nest-cli.fast.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/nest-cli#",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true,
"builder": "swc",
"typeCheck": false
}
}
2 changes: 2 additions & 0 deletions nest-cli.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "https://json.schemastore.org/nest-cli#",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true,
"builder": "swc",
"typeCheck": true
}
Expand Down
15 changes: 0 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"private": true,
"license": "UNLICENSED",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"build:fast": "nest build -c nest-cli.fast.json",
"format": "prettier --check .",
"format:write": "prettier --write .",
"start": "nest start",
Expand Down Expand Up @@ -59,7 +59,6 @@
"pg": "^8.12.0",
"raw-body": "^3.0.0",
"reflect-metadata": "^0.2.2",
"rimraf": "^5.0.10",
"rxjs": "^7.8.1",
"xmldom": "^0.6.0",
"xpath": "0.0.34"
Expand Down

0 comments on commit b8b0298

Please sign in to comment.