Openstatus www.openstatus.dev
at 552ff64ccfdc1d64cbb4ed6bec9b157e937e2ed3 118 lines 5.8 kB view raw
1# syntax=docker/dockerfile:1.11 2# This file is generated by Dofigen v2.5.1 3# See https://github.com/lenra-io/dofigen 4 5# ca-certs 6FROM debian@sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b AS ca-certs 7LABEL \ 8 org.opencontainers.image.base.digest="sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b" \ 9 org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" 10RUN apt update && apt install -y ca-certificates && update-ca-certificates 11 12# docker 13FROM oven/bun@sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 AS docker 14LABEL \ 15 org.opencontainers.image.base.digest="sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4" \ 16 org.opencontainers.image.base.name="docker.io/oven/bun:1.3.3" 17WORKDIR /app/apps/workflows 18COPY \ 19 --link \ 20 "." "/app/" 21RUN bun run src/build-docker.ts 22 23# install 24FROM oven/bun@sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 AS install 25LABEL \ 26 org.opencontainers.image.base.digest="sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4" \ 27 org.opencontainers.image.base.name="docker.io/oven/bun:1.3.3" \ 28 org.opencontainers.image.stage="install" 29WORKDIR /app/ 30RUN \ 31 --mount=type=bind,target=bunfig.toml,source=bunfig.toml \ 32 --mount=type=bind,target=package.json,source=package.json \ 33 --mount=type=bind,target=apps/workflows/package.json,source=apps/workflows/package.json \ 34 --mount=type=bind,target=packages/assertions/package.json,source=packages/assertions/package.json \ 35 --mount=type=bind,target=packages/db/package.json,source=packages/db/package.json \ 36 --mount=type=bind,target=packages/emails/package.json,source=packages/emails/package.json \ 37 --mount=type=bind,target=packages/notifications/discord/package.json,source=packages/notifications/discord/package.json \ 38 --mount=type=bind,target=packages/notifications/email/package.json,source=packages/notifications/email/package.json \ 39 --mount=type=bind,target=packages/notifications/ntfy/package.json,source=packages/notifications/ntfy/package.json \ 40 --mount=type=bind,target=packages/notifications/opsgenie/package.json,source=packages/notifications/opsgenie/package.json \ 41 --mount=type=bind,target=packages/notifications/pagerduty/package.json,source=packages/notifications/pagerduty/package.json \ 42 --mount=type=bind,target=packages/notifications/slack/package.json,source=packages/notifications/slack/package.json \ 43 --mount=type=bind,target=packages/notifications/twillio-sms/package.json,source=packages/notifications/twillio-sms/package.json \ 44 --mount=type=bind,target=packages/notifications/webhook/package.json,source=packages/notifications/webhook/package.json \ 45 --mount=type=bind,target=packages/regions/package.json,source=packages/regions/package.json \ 46 --mount=type=bind,target=packages/utils/package.json,source=packages/utils/package.json \ 47 --mount=type=bind,target=packages/tsconfig/package.json,source=packages/tsconfig/package.json \ 48 --mount=type=bind,target=packages/tinybird/package.json,source=packages/tinybird/package.json \ 49 --mount=type=bind,target=packages/upstash/package.json,source=packages/upstash/package.json \ 50 --mount=type=bind,target=packages/theme-store/package.json,source=packages/theme-store/package.json \ 51 --mount=type=cache,target=/root/.bun/install/cache,sharing=locked \ 52 bun install --production --frozen-lockfile --verbose 53 54# build 55FROM oven/bun@sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 AS build 56LABEL \ 57 org.opencontainers.image.base.digest="sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4" \ 58 org.opencontainers.image.base.name="docker.io/oven/bun:1.3.3" \ 59 org.opencontainers.image.stage="build" 60ENV NODE_ENV="production" 61WORKDIR /app/apps/workflows 62COPY \ 63 --link \ 64 "." "/app/" 65COPY \ 66 --from=install \ 67 --link \ 68 "/app/node_modules" "/app/node_modules" 69RUN bun build --compile --target bun --sourcemap --format=cjs src/index.ts --outfile=app --external '@libsql/*' --external libsql 70 71# libsql 72FROM oven/bun@sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4 AS libsql 73LABEL \ 74 org.opencontainers.image.base.digest="sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4" \ 75 org.opencontainers.image.base.name="docker.io/oven/bun:1.3.3" 76WORKDIR /app/ 77COPY \ 78 --from=docker \ 79 --link \ 80 "/app/apps/build-docker/package.json" "/app/package.json" 81RUN bun install 82 83# runtime 84FROM debian@sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b AS runtime 85LABEL \ 86 io.dofigen.version="2.5.1" \ 87 org.opencontainers.image.authors="OpenStatus Team" \ 88 org.opencontainers.image.base.digest="sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b" \ 89 org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \ 90 org.opencontainers.image.description="Background job processing and probe scheduling for OpenStatus" \ 91 org.opencontainers.image.source="https://github.com/openstatusHQ/openstatus" \ 92 org.opencontainers.image.title="OpenStatus Workflows" \ 93 org.opencontainers.image.vendor="OpenStatus" 94WORKDIR /app/ 95COPY \ 96 --from=build \ 97 --chown=1000:1000 \ 98 --chmod=555 \ 99 --link \ 100 "/app/apps/workflows/app" "/app/apps/workflows/" 101COPY \ 102 --from=libsql \ 103 --chown=1000:1000 \ 104 --link \ 105 "/app/node_modules" "/app/packages/db/node_modules" 106COPY \ 107 --from=libsql \ 108 --chown=1000:1000 \ 109 --link \ 110 "/app/node_modules" "/app/node_modules" 111COPY \ 112 --from=ca-certs \ 113 --chown=1000:1000 \ 114 --link \ 115 "/etc/ssl/certs/ca-certificates.crt" "/etc/ssl/certs/" 116USER 1000:1000 117EXPOSE 3000 118ENTRYPOINT ["/app/apps/workflows/app"]