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

Build with Node 18 #105

Merged
merged 2 commits into from
Feb 21, 2023
Merged

Build with Node 18 #105

merged 2 commits into from
Feb 21, 2023

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Feb 12, 2023

  • Bump the Dockerfile to Node 18. Only install production dependencies.
  • Bump the package file to Node 18.
  • Remove node-fetch.
  • Closes Upgrade from Node 14 #128.

Bump the Dockerfile to Node 18. Only install production dependencies.

Bump the package file to Node 18.
@@ -1,4 +1,7 @@
FROM node:14-slim as builder
FROM node:18-slim as builder
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be changed to node:18-alpine, to make the image smaller.

Comment on lines +3 to +4
ARG NODE_ENV=production
ENV NODE_ENV=$NODE_ENV
Copy link
Contributor Author

@eatyourgreens eatyourgreens Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should ensure that Webpack etc. isn't installed into the deployed image. It will install React and MobX State Tree, which aren't needed by the proxy server, so can probably be improved.

Copy link
Member

@shaunanoordin shaunanoordin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review

This PR updates the code to build with Node 18 (this mostly affects the Proxy Server), and requires Node 18 to run local development.

  • Also, node-fetch is no longer required! I didn't realise that Node 18 added the Fetch API, but it's very welcome.

Tested by running/testing 1. the web app and 2. the proxy server (example URL).

LGTM 👍

@shaunanoordin shaunanoordin merged commit b8d4d38 into master Feb 21, 2023
@shaunanoordin shaunanoordin deleted the node-18 branch February 21, 2023 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade from Node 14
2 participants