]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - Dockerfile
Allow non json reponse in fetch.
[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
7d5c71d7
L
13FROM alpine:3.11
14
fc69081c
L
15ENV USER darkhttpd
16ENV GROUP darkhttpd
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} && \
b102c9b2 22 apk add -U --no-cache su-exec darkhttpd
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
d10b219d 27
220c60cb 28HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
6dd8342b
DV
29 CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
30
481ab9a0 31EXPOSE ${PORT}
b102c9b2 32VOLUME /www/assets
481ab9a0 33ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]