]> git.immae.eu Git - github/bastienwirtz/homer.git/blame_incremental - Dockerfile
Update fontawesome from 5.15.4 to 6.1.1, fixes #432
[github/bastienwirtz/homer.git] / Dockerfile
... / ...
CommitLineData
1# build stage
2FROM node:lts-alpine as build-stage
3
4WORKDIR /app
5
6COPY package*.json ./
7RUN yarn install --frozen-lockfile
8
9COPY . .
10RUN yarn build
11
12# production stage
13FROM alpine:3.15
14
15ENV USER darkhttpd
16ENV GROUP darkhttpd
17ENV GID 911
18ENV UID 911
19ENV PORT 8080
20
21RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
22 apk add -U --no-cache su-exec darkhttpd
23
24COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
25COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
26COPY entrypoint.sh /entrypoint.sh
27
28HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
29 CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
30
31EXPOSE ${PORT}
32VOLUME /www/assets
33ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]