Switching to Earthfile
This commit is contained in:
parent
791b601dec
commit
edb3f22044
32
Dockerfile
32
Dockerfile
@ -1,32 +0,0 @@
|
|||||||
FROM node:19 as builder
|
|
||||||
|
|
||||||
RUN mkdir -p /app
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY ["package.json", "yarn.lock", ".yarnrc.yml", "tsconfig.json", "/app/"]
|
|
||||||
COPY [".yarn", "/app/.yarn"]
|
|
||||||
COPY ["src", "/app/src"]
|
|
||||||
|
|
||||||
|
|
||||||
RUN yarn install
|
|
||||||
RUN yarn build
|
|
||||||
|
|
||||||
FROM node:19
|
|
||||||
|
|
||||||
LABEL maintainer="Fabian Stamm <dev@fabianstamm.de>"
|
|
||||||
|
|
||||||
RUN mkdir -p /app
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
|
|
||||||
COPY ["package.json", "yarn.lock", ".yarnrc.yml", "/app/"]
|
|
||||||
COPY [".yarn", "/app/.yarn"]
|
|
||||||
|
|
||||||
RUN yarn install
|
|
||||||
|
|
||||||
COPY --from=builder /app/lib/ /app/lib
|
|
||||||
|
|
||||||
VOLUME [ "/app/logs", "/app/persist"]
|
|
||||||
|
|
||||||
CMD ["node", "lib/index.js"]
|
|
19
Earthfile
Normal file
19
Earthfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
VERSION 0.7
|
||||||
|
FROM node:lts-alpine3.18
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
docker-multi:
|
||||||
|
BUILD --platform linux/amd64 --platform linux/arm64 +docker
|
||||||
|
|
||||||
|
docker:
|
||||||
|
COPY package.json yarn.lock .yarnrc.yml tsconfig.json .
|
||||||
|
COPY src ./src
|
||||||
|
COPY .yarn ./.yarn
|
||||||
|
RUN ls -l
|
||||||
|
RUN yarn install
|
||||||
|
RUN yarn build
|
||||||
|
WORKDIR /build
|
||||||
|
ENTRYPOINT ["node", "lib/index.js"]
|
||||||
|
ARG EARTHLY_TARGET_TAG
|
||||||
|
ARG TAG=$EARTHLY_TARGET_TAG
|
||||||
|
SAVE IMAGE --push docker.hibas123.de/telegram-rss:$TAG
|
Loading…
Reference in New Issue
Block a user