mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
revert to previous Dockerfile
This commit is contained in:
parent
d4b05b2612
commit
81af23ecb5
13
Dockerfile
13
Dockerfile
@ -1,7 +1,7 @@
|
|||||||
# syntax = docker/dockerfile:latest
|
# syntax = docker/dockerfile:latest
|
||||||
|
|
||||||
# Install dependencies only when needed
|
# Install dependencies only when needed
|
||||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 AS deps
|
FROM node:current-alpine AS deps
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@ -9,9 +9,9 @@ COPY --link package.json pnpm-lock.yaml* ./
|
|||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
set -xe
|
set -xe
|
||||||
apk add nodejs npm libc6-compat tzdata
|
apk add libc6-compat
|
||||||
apk add --virtual .gyp python3 make g++
|
apk add --virtual .gyp python3 make g++
|
||||||
npm install -g pnpm
|
yarn global add pnpm
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm fetch | grep -v "cross-device link not permitted\|Falling back to copying packages from store"
|
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm fetch | grep -v "cross-device link not permitted\|Falling back to copying packages from store"
|
||||||
@ -27,7 +27,7 @@ COPY . .
|
|||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
set -xe
|
set -xe
|
||||||
npm run telemetry
|
yarn next telemetry disable
|
||||||
mkdir config && echo '-' > config/settings.yaml
|
mkdir config && echo '-' > config/settings.yaml
|
||||||
npm run build
|
npm run build
|
||||||
EOF
|
EOF
|
||||||
@ -42,9 +42,8 @@ LABEL org.opencontainers.image.source='https://github.com/benphelps/homepage'
|
|||||||
LABEL org.opencontainers.image.licenses='Apache-2.0'
|
LABEL org.opencontainers.image.licenses='Apache-2.0'
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
ADD docker-entrypoint.sh docker-entrypoint.sh
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy files from context (this allows the files to copy before the builder stage is done).
|
# Copy files from context (this allows the files to copy before the builder stage is done).
|
||||||
COPY --link package.json next.config.js ./
|
COPY --link package.json next.config.js ./
|
||||||
@ -60,4 +59,4 @@ EXPOSE $PORT
|
|||||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \
|
HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \
|
||||||
CMD wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:$PORT/api/healthcheck || exit 1
|
CMD wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:$PORT/api/healthcheck || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
CMD ["node", "server.js"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user