Skip to content

Commit

Permalink
Merge branch 'feature/contracts' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
radulescuandrew committed Sep 20, 2024
2 parents 2e2ef54 + 42a397e commit de769dd
Show file tree
Hide file tree
Showing 193 changed files with 13,037 additions and 585 deletions.
44 changes: 42 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
FROM --platform=linux/amd64 node:16.15.1-alpine As development
FROM --platform=linux/amd64 node:20@sha256:a4d1de4c7339eabcf78a90137dfd551b798829e3ef3e399e0036ac454afa1291 As development

Check warning on line 1 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image / Build and push image to registry

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'As' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 1 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image / Build and push image to registry

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
# installs, work.
RUN apt-get update \
&& apt-get install -y wget gnupg \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# If running Docker >= 1.13.0 use docker run's --init arg to reap zombie processes, otherwise
# uncomment the following lines to have `dumb-init` as PID 1
# ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_x86_64 /usr/local/bin/dumb-init
# RUN chmod +x /usr/local/bin/dumb-init
# ENTRYPOINT ["dumb-init", "--"]

# Uncomment to skip the chromium download when installing puppeteer. If you do,
# you'll need to launch puppeteer with:
# browser.launch({executablePath: 'google-chrome-stable'})
# ENV PUPPETEER_SKIP_DOWNLOAD true

# # Install puppeteer so it's available in the container.
# RUN npm init -y && \
# npm i puppeteer \
# # Add user so we don't need --no-sandbox.
# # same layer as npm install to keep re-chowned files from using up several hundred MBs more space
# && groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
# && mkdir -p /home/pptruser/Downloads \
# && chown -R pptruser:pptruser /home/pptruser \
# && chown -R pptruser:pptruser /node_modules \
# && chown -R pptruser:pptruser /package.json \
# && chown -R pptruser:pptruser /package-lock.json

# Run everything after as non-privileged user.
# USER pptruser

WORKDIR /usr/src/app

Expand All @@ -12,7 +50,7 @@ COPY . .

RUN npm run build

FROM --platform=linux/amd64 node:16.15.1-alpine as production
FROM --platform=linux/amd64 node:20@sha256:a4d1de4c7339eabcf78a90137dfd551b798829e3ef3e399e0036ac454afa1291 as production

Check warning on line 53 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image / Build and push image to registry

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 53 in backend/Dockerfile

View workflow job for this annotation

GitHub Actions / Build Docker image / Build and push image to registry

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
Expand All @@ -25,4 +63,6 @@ RUN npm install --only=production

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



CMD ["node", "dist/main"]
5 changes: 4 additions & 1 deletion backend/nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true,
"assets": ["modules/mail/templates/**/*"],
"assets": [
"modules/mail/templates/**/*",
"modules/documents/templates/**/*"
],
"plugins": [
{
"name": "@nestjs/swagger/plugin",
Expand Down
Loading

0 comments on commit de769dd

Please sign in to comment.