Skip to content

Commit

Permalink
Merge pull request #78 from UserOfficeProject/release-10-02-2022
Browse files Browse the repository at this point in the history
Release 10 02 2022
  • Loading branch information
vyshnavi1605 authored Feb 10, 2022
2 parents b972afd + b42f42f commit 5562a82
Show file tree
Hide file tree
Showing 35 changed files with 12,859 additions and 5,475 deletions.
22 changes: 19 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"plugins": [
"@typescript-eslint", // Let's us override rules below.
"jest",
"import"
"import",
"unused-imports"
],
"rules": {
"semi": ["error", "always"],
Expand Down Expand Up @@ -42,7 +43,20 @@
}
],
"quotes": ["error", "single"],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
{
"selector": "function",
"format": ["PascalCase", "camelCase"]
}
],
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-inferrable-types": [
"warn",
Expand All @@ -51,9 +65,11 @@
}
],
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" }
]
],
"unused-imports/no-unused-imports-ts": 2
}
}
2 changes: 1 addition & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [16.x]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
13 changes: 11 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"singleQuote": true,
"trailingComma": "es5"
}
"trailingComma": "es5",
"endOfLine": "auto",
"overrides": [
{
"files": ["*.yml", "*.yaml"],
"options": {
"singleQuote": false
}
}
]
}
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS build-stage
FROM node:16.13-alpine AS build-stage

RUN apk add --no-cache \
python3 \
Expand Down Expand Up @@ -26,11 +26,11 @@ COPY --chown=node:node . .

RUN npm run build

FROM alpine:3.13
FROM alpine:3.15

# Installs Chromium (86) package.
# Installs Chromium (93) package.
RUN apk add --no-cache \
"chromium~=86.0.4240.111-r0" \
"chromium~=93.0.4577.82-r2" \
nss \
freetype \
freetype-dev \
Expand All @@ -54,7 +54,7 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

# Add user so we don't need --no-sandbox.
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \
RUN addgroup -S -g 1000 pptruser && adduser -S -u 1000 -g pptruser pptruser \
&& mkdir -p /home/pptruser/Downloads /app \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /app
Expand Down
20 changes: 15 additions & 5 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:3.12
FROM alpine:3.15

# Installs Chromium (86) package.
RUN apk add --no-cache \
"chromium~=86.0.4240.111-r0" \
"chromium~=93.0.4577.82-r2" \
nss \
freetype \
freetype-dev \
Expand All @@ -11,14 +11,24 @@ RUN apk add --no-cache \
ttf-freefont \
nodejs \
npm \
graphicsmagick

WORKDIR /tmp
graphicsmagick \
build-base \
g++ \
cairo-dev \
jpeg-dev \
pango-dev \
giflib-dev \
&& addgroup -S -g 1000 pptruser && adduser -S -u 1000 -g pptruser pptruser \
&& mkdir -p /home/pptruser/Downloads /app \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /app

#Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

USER pptruser

WORKDIR /app

EXPOSE 4500
Expand Down
Loading

0 comments on commit 5562a82

Please sign in to comment.