mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-24 05:04:08 -08:00
Compile healthcheck.go
This commit is contained in:
parent
ad5e1957b1
commit
9bfa43100b
|
@ -1,13 +1,22 @@
|
||||||
|
# Build need Golang
|
||||||
|
FROM golang:1.19-buster AS build_healthcheck
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Compile healthcheck.go
|
||||||
|
RUN go build -o ./extra/healthcheck ./extra/healthcheck.go
|
||||||
|
|
||||||
|
# Build need Node.js
|
||||||
FROM louislam/uptime-kuma:base-debian AS build
|
FROM louislam/uptime-kuma:base-debian AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
|
||||||
|
|
||||||
COPY . .
|
COPY --from=build_healthcheck /app /app
|
||||||
RUN npm ci --production && \
|
RUN npm ci --production && \
|
||||||
chmod +x /app/extra/entrypoint.sh
|
chmod +x /app/extra/entrypoint.sh
|
||||||
|
|
||||||
|
|
||||||
FROM louislam/uptime-kuma:base-debian AS release
|
FROM louislam/uptime-kuma:base-debian AS release
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
@ -16,7 +25,7 @@ COPY --from=build /app /app
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
VOLUME ["/app/data"]
|
VOLUME ["/app/data"]
|
||||||
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD node extra/healthcheck.js
|
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD extra/healthcheck
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--", "extra/entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--", "extra/entrypoint.sh"]
|
||||||
CMD ["node", "server/server.js"]
|
CMD ["node", "server/server.js"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue