# syntax=docker/dockerfile:1.19.0 # This file is generated by Dofigen v2.6.0 # See https://github.com/lenra-io/dofigen # ca-certs FROM debian@sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734 AS ca-certs LABEL \ org.opencontainers.image.base.digest="sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734" \ org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" RUN apt update && apt install -y ca-certificates curl && update-ca-certificates # docker FROM oven/bun@sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a AS docker LABEL \ org.opencontainers.image.base.digest="sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a" \ org.opencontainers.image.base.name="docker.io/oven/bun:1.3.6" WORKDIR /app/apps/workflows COPY \ --link \ "." "/app/" RUN bun run src/build-docker.ts # install FROM oven/bun@sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a AS install LABEL \ org.opencontainers.image.base.digest="sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a" \ org.opencontainers.image.base.name="docker.io/oven/bun:1.3.6" \ org.opencontainers.image.stage="install" WORKDIR /app/ RUN \ --mount=type=bind,target=bunfig.toml,source=bunfig.toml \ --mount=type=bind,target=package.json,source=package.json \ --mount=type=bind,target=apps/workflows/package.json,source=apps/workflows/package.json \ --mount=type=bind,target=packages/assertions/package.json,source=packages/assertions/package.json \ --mount=type=bind,target=packages/db/package.json,source=packages/db/package.json \ --mount=type=bind,target=packages/emails/package.json,source=packages/emails/package.json \ --mount=type=bind,target=packages/notifications/discord/package.json,source=packages/notifications/discord/package.json \ --mount=type=bind,target=packages/notifications/email/package.json,source=packages/notifications/email/package.json \ --mount=type=bind,target=packages/notifications/google-chat/package.json,source=packages/notifications/google-chat/package.json \ --mount=type=bind,target=packages/notifications/ntfy/package.json,source=packages/notifications/ntfy/package.json \ --mount=type=bind,target=packages/notifications/opsgenie/package.json,source=packages/notifications/opsgenie/package.json \ --mount=type=bind,target=packages/notifications/pagerduty/package.json,source=packages/notifications/pagerduty/package.json \ --mount=type=bind,target=packages/notifications/slack/package.json,source=packages/notifications/slack/package.json \ --mount=type=bind,target=packages/notifications/telegram/package.json,source=packages/notifications/telegram/package.json \ --mount=type=bind,target=packages/notifications/twillio-whatsapp/package.json,source=packages/notifications/twillio-whatsapp/package.json \ --mount=type=bind,target=packages/notifications/twillio-sms/package.json,source=packages/notifications/twillio-sms/package.json \ --mount=type=bind,target=packages/notifications/webhook/package.json,source=packages/notifications/webhook/package.json \ --mount=type=bind,target=packages/regions/package.json,source=packages/regions/package.json \ --mount=type=bind,target=packages/utils/package.json,source=packages/utils/package.json \ --mount=type=bind,target=packages/tsconfig/package.json,source=packages/tsconfig/package.json \ --mount=type=bind,target=packages/tinybird/package.json,source=packages/tinybird/package.json \ --mount=type=bind,target=packages/upstash/package.json,source=packages/upstash/package.json \ --mount=type=bind,target=packages/theme-store/package.json,source=packages/theme-store/package.json \ --mount=type=cache,target=/root/.bun/install/cache,sharing=locked \ bun install --production --frozen-lockfile --verbose # build FROM oven/bun@sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a AS build LABEL \ org.opencontainers.image.base.digest="sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a" \ org.opencontainers.image.base.name="docker.io/oven/bun:1.3.6" \ org.opencontainers.image.stage="build" ENV NODE_ENV="production" WORKDIR /app/apps/workflows COPY \ --link \ "." "/app/" COPY \ --from=install \ --link \ "/app/node_modules" "/app/node_modules" RUN bun build --compile --target bun --sourcemap src/index.ts --outfile=app # libsql FROM oven/bun@sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a AS libsql LABEL \ org.opencontainers.image.base.digest="sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a" \ org.opencontainers.image.base.name="docker.io/oven/bun:1.3.6" WORKDIR /app/ COPY \ --from=docker \ --link \ "/app/apps/build-docker/package.json" "/app/package.json" RUN bun install # runtime FROM debian@sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734 AS runtime LABEL \ io.dofigen.version="2.6.0" \ org.opencontainers.image.authors="OpenStatus Team" \ org.opencontainers.image.base.digest="sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734" \ org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \ org.opencontainers.image.description="Background job processing and probe scheduling for OpenStatus" \ org.opencontainers.image.source="https://github.com/openstatusHQ/openstatus" \ org.opencontainers.image.title="OpenStatus Workflows" \ org.opencontainers.image.vendor="OpenStatus" WORKDIR /app/ COPY \ --from=build \ --chown=1000:1000 \ --chmod=555 \ --link \ "/app/apps/workflows/app" "/app/apps/workflows/" COPY \ --from=libsql \ --chown=1000:1000 \ --link \ "/app/node_modules" "/app/packages/db/node_modules" COPY \ --from=libsql \ --chown=1000:1000 \ --link \ "/app/node_modules" "/app/node_modules" COPY \ --from=ca-certs \ --chown=1000:1000 \ --link \ "/etc/ssl/certs/ca-certificates.crt" "/etc/ssl/certs/" COPY \ --from=ca-certs \ --chown=1000:1000 \ --link \ "/usr/bin/curl" "/usr/bin/curl" USER 1000:1000 EXPOSE 3000 ENTRYPOINT ["/app/apps/workflows/app"]