Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: skip type checking and suppress npm ci output on docker build #373

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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