]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - Dockerfile
Replaced darkhttpd with lighttpd
[github/bastienwirtz/homer.git] / Dockerfile
CommitLineData
b9c5fcf0
BW
1# build stage
2FROM node:lts-alpine as build-stage
3
4WORKDIR /app
5
6COPY package*.json ./
e6596ca6 7RUN yarn install --frozen-lockfile
b9c5fcf0
BW
8
9COPY . .
10RUN yarn build
11
12# production stage
e961af82 13FROM alpine:3.15
7d5c71d7 14
b6b31e44
K
15ENV USER lighttpd
16ENV GROUP lighttpd
7d5c71d7
L
17ENV GID 911
18ENV UID 911
481ab9a0 19ENV PORT 8080
7d5c71d7
L
20
21RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
b6b31e44 22 apk add -U --no-cache lighttpd
7d5c71d7 23
d10b219d 24COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
b102c9b2 25COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
fd9237eb 26COPY entrypoint.sh /entrypoint.sh
b6b31e44 27COPY lighttpd.conf /lighttpd.conf
d10b219d 28
220c60cb 29HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
6dd8342b
DV
30 CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
31
481ab9a0 32EXPOSE ${PORT}
b102c9b2 33VOLUME /www/assets
481ab9a0 34ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]