ScreenSharingThing/Earthfile

40 lines
915 B
Plaintext
Raw Permalink Normal View History

2023-06-08 14:33:34 +00:00
VERSION 0.7
FROM node:lts-alpine3.18
WORKDIR /build
2023-07-13 20:59:14 +00:00
deps:
COPY .yarnrc.yml .yarnrc.yml
COPY .yarn .yarn
COPY package.json .
COPY Server/package.json Server/
COPY Client/package.json Client/
RUN apk add --no-cache git python3 make g++ gcc
RUN yarn install
build:
FROM +deps
COPY Client ./Client
COPY Server ./Server
RUN yarn install
RUN sh -c "find . -type f -name '*.ts' | grep -v node_modules"
RUN yarn build
SAVE ARTIFACT Client/dist /dist
SAVE ARTIFACT Server/lib /lib
2023-06-08 14:33:34 +00:00
docker-multi:
2023-07-13 20:59:14 +00:00
BUILD +build
2023-06-08 14:33:34 +00:00
BUILD --platform linux/amd64 --platform linux/arm64 +docker
docker:
2023-07-13 20:59:14 +00:00
FROM +deps
COPY +build/lib ./Server/lib
COPY +build/dist ./Server/public
WORKDIR /build/Server
2023-06-08 14:33:34 +00:00
ENTRYPOINT ["node", "lib/index.js"]
2023-07-13 20:59:14 +00:00
2023-06-08 14:33:34 +00:00
ARG EARTHLY_TARGET_TAG
ARG TAG=$EARTHLY_TARGET_TAG
2023-07-13 13:13:53 +00:00
SAVE IMAGE --push git.hibas.dev/hibas123/screenshare:$TAG