Skip to content

Commit

Permalink
fix: Updated Yarn to v3.6.4 and updated CI/CD configuration file (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharking authored Feb 12, 2025
1 parent 5b71ced commit d6f1eb6
Show file tree
Hide file tree
Showing 11 changed files with 10,591 additions and 6,548 deletions.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
FROM node:20 as base

# Setup yarn version
RUN corepack enable
RUN yarn set version 3.6.4
RUN corepack prepare yarn@3.6.4 --activate

# AFJ specifc setup
WORKDIR /www
ENV RUN_MODE="docker"

COPY package.json yarn.lock ./
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn/releases/ .yarn/releases/
COPY .yarn/plugins/ .yarn/plugins/

COPY packages/model/package.json packages/model/package.json
COPY packages/main/package.json packages/main/package.json
Expand Down
874 changes: 874 additions & 0 deletions examples/chatbot/.yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

34 changes: 19 additions & 15 deletions examples/chatbot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
FROM node:18 as base

COPY package.json yarn.lock tsconfig.json tsconfig.build.json ./
# Setup yarn version
RUN corepack enable
RUN yarn set version 3.6.4
RUN corepack prepare yarn@3.6.4 --activate

# AFJ specifc setup
WORKDIR /www
ENV RUN_MODE="docker"

COPY package.json yarn.lock tsconfig.json tsconfig.build.json .yarnrc.yml ./
COPY .yarn/releases/ .yarn/releases/
COPY .yarn/plugins/ .yarn/plugins/
COPY packages/model/package.json packages/model/package.json
COPY packages/client/package.json packages/client/package.json

Expand All @@ -21,22 +32,15 @@ FROM base as final
WORKDIR /www
ENV RUN_MODE="docker"

COPY examples/chatbot/package.json examples/chatbot/package.json
COPY examples/chatbot/yarn.lock examples/chatbot/yarn.lock
COPY examples/chatbot/ examples/chatbot/

# Run install after copying only depdendency file
# to make use of docker layer caching
COPY --from=base packages/model /www/packages/model
COPY --from=base packages/client /www/packages/client
RUN yarn --cwd examples/chatbot install


# Copy other depdencies
COPY examples/chatbot/index.ts examples/chatbot/index.ts
COPY examples/chatbot/data.ts examples/chatbot/data.ts
COPY examples/chatbot/phone-cred-def-dev.json examples/chatbot/phone-cred-def-dev.json
COPY examples/chatbot/tsconfig.json examples/chatbot/tsconfig.json
COPY --from=base /www/packages ./packages
WORKDIR /www/examples/chatbot
RUN yarn install
RUN yarn build

RUN yarn --cwd examples/chatbot build
COPY examples/chatbot/public examples/chatbot/build/public
CMD yarn --cwd examples/chatbot start
WORKDIR /www/examples/chatbot
CMD yarn start
5 changes: 5 additions & 0 deletions examples/chatbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@types/express": "^4.17.13",
"@types/node": "^16.7.10",
"@types/node-fetch": "^2.6.2",
"rimraf": "^6.0.1",
"ts-node-dev": "^2.0.0",
"tsconfig-paths": "^4.1.0",
"typescript": "4.7.4"
Expand All @@ -30,5 +31,9 @@
"express": "^4.18.1",
"node-fetch": "^2.6.7",
"tslog": "^4.8.2"
},
"resolutions": {
"@types/express": "4.17.21",
"express": "4.21.0"
}
}
Loading

0 comments on commit d6f1eb6

Please sign in to comment.