]> git.immae.eu Git - github/bastienwirtz/homer.git/blame_incremental - Dockerfile
Bump vite from 4.4.9 to 4.5.2
[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.18
14
15ENV GID 1000
16ENV UID 1000
17ENV PORT 8080
18ENV SUBFOLDER "/_"
19ENV INIT_ASSETS 1
20ENV IPV6_DISABLE 0
21
22RUN addgroup -S lighttpd -g ${GID} && adduser -D -S -u ${UID} lighttpd lighttpd && \
23 apk add -U --no-cache lighttpd
24
25WORKDIR /www
26
27COPY lighttpd.conf /lighttpd.conf
28COPY lighttpd-ipv6.sh /etc/lighttpd/ipv6.sh
29COPY entrypoint.sh /entrypoint.sh
30COPY --from=build-stage --chown=${UID}:${GID} /app/dist /www/
31COPY --from=build-stage --chown=${UID}:${GID} /app/dist/assets /www/default-assets
32
33USER ${UID}:${GID}
34
35HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
36 CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
37
38EXPOSE ${PORT}
39
40ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]