OpenAuth_server/Earthfile
Fabian Stamm 9234efab2a
Some checks failed
CI / build (push) Failing after 25s
Add earthfile and ci
2023-11-28 19:49:29 +01:00

40 lines
840 B
Plaintext

VERSION 0.7
FROM node:20-alpine3.18
WORKDIR /build
project:
COPY . .
RUN yarn install
build:
FROM +project
RUN yarn build
SAVE ARTIFACT /build/Backend/lib /Backend
SAVE ARTIFACT /build/Frontend/build /Frontend
SAVE ARTIFACT /build/FrontendLegacy/out /FrontendLegacy
docker-multi:
BUILD +build
BUILD --platform linux/amd64 --platform linux/arm64 +docker
docker:
FROM +project
# RUN apk add --no-cache caddy supervisor
# COPY ./supervisord.conf /etc/supervisord.conf
COPY +build/Backend /build/Backend/lib
COPY +build/Frontend /build/Frontend/build
COPY +build/FrontendLegacy /build/FrontendLegacy/out
WORKDIR /build/Backend
ENTRYPOINT ["node", "lib/index.js"]
ARG EARTHLY_TARGET_TAG
ARG TAG=$EARTHLY_TARGET_TAG
SAVE IMAGE --push git.hibas.dev/openserver/openauth:$TAG