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