Skip to content

Commit

Permalink
ff
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommytrg committed Dec 5, 2024
1 parent d70c9f9 commit 3010d6f
Show file tree
Hide file tree
Showing 4 changed files with 16,659 additions and 13,466 deletions.
11 changes: 11 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
nodeLinker: node-modules
logFilters:
- code: YN0002
level: discard
- code: YN0013
level: discard
- code: YN0032
level: discard
- code: YN0060
level: discard
- code: YN0061
level: discard
20 changes: 8 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
FROM node:16-alpine3.15
FROM node:20-bookworm

ARG TARGETPLATFORM

# Install dependencies not included in the base image
RUN apk update
RUN apk upgrade
RUN apk --no-cache add bash ca-certificates curl
RUN apk add --no-cache git
RUN apk add --no-cache openssh-client
RUN apt update && apt upgrade -y
RUN apt install bash ca-certificates curl git openssh-client

# Update CA certificates
RUN update-ca-certificates
Expand All @@ -18,19 +15,18 @@ COPY . /data

# Navigate to the nodejs root package, install dependencies and build the project
WORKDIR /data
RUN corepack enable
RUN corepack prepare [email protected] --activate
RUN corepack enable && corepack prepare [email protected] --activate

# Subroutine for arm64 platform
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
echo "Current platform linux/amd64"; \
yarn install --silent; \
yarn; \
yarn build; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
echo "Current platform linux/arm64"; \
apk add --no-cache build-base; \
yarn add node-gyp; \
yarn install --silent; \
apt install build-essential; \
yarn global add node-gyp; \
yarn; \
yarn build; \
else \
echo "Unsupported platform: $TARGETPLATFORM"; \
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,6 @@
"graphql-request": "^6.1.0",
"json-rpc-2.0": "~1.7.0",
"winston": "~3.13.0"
}
},
"packageManager": "[email protected]+sha512.786c27300bc8fb134a1a0630db71cfeccc2b92272c031df17ff662876e89c2df488e6819dd7f2ffaf02e021b6827f75d3eb6a6df0a10218f72a589b735db6cc2"
}
Loading

0 comments on commit 3010d6f

Please sign in to comment.