-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (22 loc) · 839 Bytes
/
Dockerfile
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
FROM node:lts-alpine as source
WORKDIR /app
COPY package* /app/
RUN npm ci --omit=dev
COPY . /app
FROM source as build
RUN npm ci && npx svelte-kit sync && npm run build
FROM node:lts-alpine
LABEL org.opencontainers.image.title=statstag
LABEL org.opencontainers.image.version=0.0.2
LABEL org.opencontainers.image.description="a custom leaderboard app"
LABEL org.opencontainers.image.url=https://github.com/mfinelli/statstag
LABEL org.opencontainers.image.source https://github.com/mfinelli/statstag
LABEL org.opencontainers.image.licenses=AGPL-3.0-or-later
WORKDIR /usr/share/statstag
RUN addgroup -S statstag && adduser -S statstag -G statstag
COPY --from=source /app /usr/src/statstag/
COPY --from=build /app/server.js .
COPY --from=build /app/build .
COPY --from=build /app/package.json .
USER statstag
CMD ["node", "server.js"]