Skip to content

Commit

Permalink
Removed Yarn (in favor of NPM ), Updated Docker, Reran/updated packag…
Browse files Browse the repository at this point in the history
…es. (#786)

We previously managed our packages with two different package managers,
which often led to confusion and inconsistencies within the repository.
Some parts of the codebase used Yarn, while others, like Docker
configurations, relied on npm.

This setup resulted in numerous dependency mismatches/conflucts,
duplicate caching and storage, and larger build times. To align with the
majority of our repository, which already uses npm (e.g., our runner
scripts), I remove Yarn entirely and standardize on npm. I eliminated
all references to Yarn, including removing the yarn.lock file/cache.
Additionally, we updated our Dockerfile from using Node.js version 16 to
version 18 to meet the requirements of our applications and removed the
reference to yarn in our dockerfile. Which is odd because our local
dockerfile used yarn while our dockerfile on gcp references npm?
  • Loading branch information
Kevin101Zhang authored Jun 11, 2024
1 parent 7e8b462 commit 8ffa697
Show file tree
Hide file tree
Showing 5 changed files with 12,627 additions and 6,087 deletions.
11 changes: 5 additions & 6 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM node:16-alpine as dependencies
FROM node:18-alpine as dependencies
WORKDIR ./
COPY package.json yarn.lock ./
COPY package.json package-lock.json ./
RUN npm install


FROM node:16-alpine as builder
FROM node:18-alpine as builder
# Set build arguments and environment variables
ARG NEXT_PUBLIC_REGISTRY_CONTRACT_ID
ARG NEXT_PUBLIC_HASURA_ENDPOINT
Expand All @@ -16,7 +15,7 @@ COPY . .
COPY --from=dependencies ./node_modules ./node_modules
RUN npm run build

FROM node:16-alpine as runner
FROM node:18-alpine as runner
WORKDIR ./
ENV NODE_ENV production

Expand All @@ -25,4 +24,4 @@ COPY --from=builder ./node_modules ./node_modules
COPY --from=builder ./package.json ./package.json

EXPOSE 3000
CMD ["npm", "run","start"]
CMD ["npm", "run", "start"]
Loading

0 comments on commit 8ffa697

Please sign in to comment.