aboutsummaryrefslogtreecommitdiff
path: root/migroserbices/falin/Earthfile
blob: 51f8b7a3d7a5510deac42d8245fdb3dc48f46aeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
VERSION 0.8

FROM alpine:edge

WORKDIR /app

ENV NODE_ENV="production"
LABEL org.opencontainers.image.source="https://github.com/Xe/x"


build:
    RUN apk -U add build-base gyp pkgconfig python3 nodejs npm

    COPY package-lock.json package.json ./
    RUN npm ci --include=dev

    COPY . .

    RUN npm run build

    RUN npm prune --omit=dev

    SAVE ARTIFACT /app

run:
    RUN apk -U add nodejs

    COPY +build/app /app

    EXPOSE 3000
    CMD [ "node", "src/main.js" ]

    SAVE IMAGE --push ghcr.io/xe/x/falin