You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
52 lines
1.3 KiB
3 years ago
|
FROM louislam/uptime-kuma:base-debian AS build
|
||
4 years ago
|
WORKDIR /app
|
||
4 years ago
|
|
||
3 years ago
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
|
||
|
|
||
3 years ago
|
COPY . .
|
||
3 years ago
|
RUN npm ci && \
|
||
3 years ago
|
npm run build && \
|
||
3 years ago
|
npm ci --production && \
|
||
3 years ago
|
chmod +x /app/extra/entrypoint.sh
|
||
|
|
||
4 years ago
|
|
||
3 years ago
|
FROM louislam/uptime-kuma:base-debian AS release
|
||
3 years ago
|
WORKDIR /app
|
||
3 years ago
|
|
||
3 years ago
|
# Copy app files from build layer
|
||
3 years ago
|
COPY --from=build /app /app
|
||
4 years ago
|
|
||
|
EXPOSE 3001
|
||
|
VOLUME ["/app/data"]
|
||
3 years ago
|
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD node extra/healthcheck.js
|
||
3 years ago
|
ENTRYPOINT ["/usr/bin/dumb-init", "--", "extra/entrypoint.sh"]
|
||
3 years ago
|
CMD ["node", "server/server.js"]
|
||
4 years ago
|
|
||
3 years ago
|
FROM release AS nightly
|
||
|
RUN npm run mark-as-nightly
|
||
3 years ago
|
|
||
|
# Upload the artifact to Github
|
||
3 years ago
|
FROM louislam/uptime-kuma:base-debian AS upload-artifact
|
||
3 years ago
|
WORKDIR /
|
||
|
RUN apt update && \
|
||
|
apt --yes install curl file
|
||
|
|
||
|
ARG GITHUB_TOKEN
|
||
|
ARG TARGETARCH
|
||
|
ARG PLATFORM=debian
|
||
3 years ago
|
ARG VERSION
|
||
|
ARG FILE=$PLATFORM-$TARGETARCH-$VERSION.tar.gz
|
||
|
ARG DIST=dist.tar.gz
|
||
3 years ago
|
|
||
|
COPY --from=build /app /app
|
||
3 years ago
|
RUN chmod +x /app/extra/upload-github-release-asset.sh
|
||
3 years ago
|
|
||
3 years ago
|
# Full Build
|
||
|
# RUN tar -zcvf $FILE app
|
||
|
# RUN /app/extra/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=louislam repo=uptime-kuma tag=$VERSION filename=$FILE
|
||
3 years ago
|
|
||
3 years ago
|
# Dist only
|
||
|
RUN cd /app && tar -zcvf $DIST dist
|
||
3 years ago
|
RUN /app/extra/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=louislam repo=uptime-kuma tag=$VERSION filename=/app/$DIST
|
||
3 years ago
|
|