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