Add Earthfile and update version

This commit is contained in:
Fabian Stamm
2024-06-29 12:46:52 +02:00
parent bca3049c27
commit df28d3c411
3 changed files with 28 additions and 3 deletions

26
Earthfile Normal file
View File

@ -0,0 +1,26 @@
VERSION 0.7
docker-multi:
BUILD --platform linux/amd64 --platform linux/arm64 +docker
build:
FROM node:lts
WORKDIR /build
COPY . .
RUN npm config set registry https://npm.hibas123.de
RUN npm install
RUN npm run build
SAVE ARTIFACT dist secure_notes_files
docker:
FROM busybox:1.36
WORKDIR /app
COPY --platform=linux/amd64 +build/secure_notes_files /app/
CMD ["busybox", "httpd", "-f", "-v", "-p", "3001", "-h", "/app"]
ARG EARTHLY_TARGET_TAG
ARG TAG=$EARTHLY_TARGET_TAG
SAVE IMAGE --push git.hibas.dev/openserver/secure_notes:$TAG