Skip to content

Commit

Permalink
Merge pull request #2184 from City-of-Helsinki/hl-915
Browse files Browse the repository at this point in the history
HL-915 | Remove Node's OpenSSL legacy version switches
  • Loading branch information
sirtawast authored Aug 28, 2023
2 parents 9077729 + ee8f146 commit c634724
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bf-applicant-frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
- name: Check that building dev application works
env:
NEXTJS_DISABLE_SENTRY: true
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
run: yarn build
2 changes: 1 addition & 1 deletion .github/workflows/bf-handler-frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
- name: Check that building dev application works
env:
NEXTJS_DISABLE_SENTRY: true
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
run: yarn build
2 changes: 1 addition & 1 deletion .github/workflows/ks-empl-frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Check that building dev application works
env:
NEXTJS_DISABLE_SENTRY: true
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
run: yarn build
- name: Frontend build failure slack notification
uses: rtCamp/action-slack-notify@v2
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ks-handler-frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Check that building dev application works
env:
NEXTJS_DISABLE_SENTRY: true
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
run: yarn build
- name: Frontend build failure slack notification
uses: rtCamp/action-slack-notify@v2
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ks-youth-frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Check that building dev application works
env:
NEXTJS_DISABLE_SENTRY: true
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
run: yarn build
- name: Frontend build failure slack notification
uses: rtCamp/action-slack-notify@v2
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/te-admn-frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Check that building dev application works
env:
NEXTJS_DISABLE_SENTRY: true
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
run: yarn build
- name: Frontend build failure slack notification
uses: rtCamp/action-slack-notify@v2
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/te-yout-frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Check that building dev application works
env:
NEXTJS_DISABLE_SENTRY: true
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
run: yarn build
- name: Frontend build failure slack notification
uses: rtCamp/action-slack-notify@v2
env:
Expand Down
6 changes: 2 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FROM appbase as development

# Set V8 max heap size to 2GB (default is 512MB)
# This prevents Docker Compose from crashing due to out of memory errors
ENV NODE_OPTIONS="--max_old_space_size=2048 --openssl-legacy-provider"
ENV NODE_OPTIONS="--max_old_space_size=2048"

ARG PROJECT
ARG FOLDER
Expand Down Expand Up @@ -92,7 +92,7 @@ COPY --chown=appuser:appuser . .
# Build application
WORKDIR /app/$PROJECT/$FOLDER/

RUN NODE_OPTIONS=--openssl-legacy-provider yarn build
RUN yarn build

# Clean all dependencies (this should avoid caching + missing /pages directory problem)
RUN rm -rf node_modules
Expand All @@ -102,8 +102,6 @@ RUN yarn cache clean
FROM helsinkitest/node:18-slim AS production
# ==========================================

ENV NODE_OPTIONS="--openssl-legacy-provider"

ARG PORT
ARG PROJECT
ARG FOLDER
Expand Down
14 changes: 7 additions & 7 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"scripts": {
"audit": "npx lerna-audit --level=high --groups=dependencies",
"build": "npx lerna run build",
"ks-empl:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider npx lerna run --scope @frontend/employer --stream build",
"ks-hdlr:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider npx lerna run --scope @frontend/ks-handler --stream build",
"ks-youth:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider npx lerna run --scope @frontend/youth --stream build",
"bf-appl:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider npx lerna run --scope @frontend/applicant --stream build",
"bf-hdlr:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider npx lerna run --scope @frontend/bf-handler --stream build",
"ks-empl:build": "cross-env npx lerna run --scope @frontend/employer --stream build",
"ks-hdlr:build": "cross-env npx lerna run --scope @frontend/ks-handler --stream build",
"ks-youth:build": "cross-env npx lerna run --scope @frontend/youth --stream build",
"bf-appl:build": "cross-env npx lerna run --scope @frontend/applicant --stream build",
"bf-hdlr:build": "cross-env npx lerna run --scope @frontend/bf-handler --stream build",
"ks-empl:dev": "npx lerna run --scope @frontend/employer --stream dev",
"ks-hdlr:dev": "npx lerna run --scope @frontend/ks-handler --stream dev",
"ks-youth:dev": "npx lerna run --scope @frontend/youth --stream dev",
Expand Down Expand Up @@ -50,13 +50,13 @@
"ks-youth:browser-test:ci": "yarn --cwd kesaseteli/youth browser-test:ci",
"shared:test": " yarn --cwd shared test",
"ks-shared:test": " yarn --cwd kesaseteli/shared test",
"te-admin:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider npx lerna run --scope @frontend/te-admin --stream build",
"te-admin:build": "cross-env npx lerna run --scope @frontend/te-admin --stream build",
"te-admin:dev": "npx lerna run --scope @frontend/te-admin --stream dev",
"te-admin:start": "npx lerna run --scope @frontend/te-admin --stream start",
"te-admin:test": " yarn --cwd tet/admin test",
"te-admin:browser-test": "yarn --cwd tet/admin browser-test",
"te-admin:browser-test:ci": "yarn --cwd tet/admin browser-test:ci",
"te-youth:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider npx lerna run --scope @frontend/te-youth --stream build",
"te-youth:build": "cross-env npx lerna run --scope @frontend/te-youth --stream build",
"te-youth:dev": "npx lerna run --scope @frontend/te-youth --stream dev",
"te-youth:start": "npx lerna run --scope @frontend/te-youth --stream start",
"te-youth:test": " yarn --cwd tet/youth test",
Expand Down

0 comments on commit c634724

Please sign in to comment.