Skip to content

Commit

Permalink
🚀 WIP pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKnarf committed Feb 1, 2024
1 parent fc5c663 commit 8b3dad9
Show file tree
Hide file tree
Showing 11 changed files with 13,639 additions and 15,779 deletions.
29 changes: 8 additions & 21 deletions .github/actions/yarn-install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,12 @@ runs:
with:
node-version: 20

- name: 'Getting yarn cache directory path'
id: yarn-cache-dir-path
working-directory: ./client
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]

- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Installing Dependencies'
working-directory: ./client
run: yarn install --immutable --inline-builds
shell: bash
env:
YARN_ENABLE_GLOBAL_CACHE: 'false'
YARN_NM_MODE: 'hardlinks-local'
HUSKY: '0'
- name: Install dependencies
run: pnpm install
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use an official Node.js runtime as a parent image
FROM node:20 as frontend
FROM node:18 as frontend

# Set the working directory in the container
WORKDIR /app
Expand All @@ -8,7 +8,7 @@ WORKDIR /app
COPY ./client/package*.json ./client/yarn.lock ./

# Install client dependencies
RUN yarn install --frozen-lockfile --production=false
RUN yarn install --production=false

# Copy the rest of the client application code to the container
COPY ./client ./
Expand All @@ -20,7 +20,7 @@ RUN yarn build
RUN find . -maxdepth 1 -type f ! -path "./dist/*" -delete

# Create a new image based on the "bff-node" project
FROM node:20
FROM node:18

# Set the working directory in the container
WORKDIR /app
Expand All @@ -30,10 +30,10 @@ COPY --from=frontend /app/dist ./src/public
COPY ./bff-node/package*.json ./bff-node/yarn.lock ./

# Install "bff-node" project dependencies (assuming you have a package.json file in "bff-node" folder)
RUN yarn install --frozen-lockfile
RUN yarn install

COPY ./bff-node ./
EXPOSE 80

# Start the "bff-node" server (modify the startup command as needed)
CMD ["yarn", "start"]
CMD ["yarn", "start"]
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

- Install Docker. We recommend to use OrbStack if you're using Mac or Windows for development, on Linux you can install Docker directly.


- Install pnpm. On macOS you can do that with `brew install pnpm`.
Loading

0 comments on commit 8b3dad9

Please sign in to comment.