Openstatus www.openstatus.dev
at main 225 lines 7.3 kB view raw
1effective: | 2 ignore: 3 - node_modules 4 - /apps/docs 5 - /apps/screenshot-service 6 - /apps/web 7 - /apps/dashboard 8 - /apps/status-page 9 - /apps/workflows 10 - /packages/api 11 - /packages/integrations/vercel 12 builders: 13 install: 14 fromImage: 15 path: oven/bun 16 digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a 17 label: 18 org.opencontainers.image.base.digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a 19 org.opencontainers.image.stage: install 20 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6 21 workdir: /app/ 22 run: 23 - bun install --production --frozen-lockfile --verbose 24 cache: 25 - target: /root/.bun/install/cache 26 bind: 27 - target: bunfig.toml 28 source: bunfig.toml 29 - target: package.json 30 source: package.json 31 - target: apps/server/package.json 32 source: apps/server/package.json 33 - target: packages/analytics/package.json 34 source: packages/analytics/package.json 35 - target: packages/db/package.json 36 source: packages/db/package.json 37 - target: packages/proto/package.json 38 source: packages/proto/package.json 39 - target: packages/emails/package.json 40 source: packages/emails/package.json 41 - target: packages/error/package.json 42 source: packages/error/package.json 43 - target: packages/regions/package.json 44 source: packages/regions/package.json 45 - target: packages/tinybird/package.json 46 source: packages/tinybird/package.json 47 - target: packages/tracker/package.json 48 source: packages/tracker/package.json 49 - target: packages/upstash/package.json 50 source: packages/upstash/package.json 51 - target: packages/utils/package.json 52 source: packages/utils/package.json 53 - target: packages/tsconfig/package.json 54 source: packages/tsconfig/package.json 55 - target: packages/assertions/package.json 56 source: packages/assertions/package.json 57 - target: packages/theme-store/package.json 58 source: packages/theme-store/package.json 59 build: 60 fromImage: 61 path: oven/bun 62 digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a 63 label: 64 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.6 65 org.opencontainers.image.stage: build 66 org.opencontainers.image.base.digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a 67 workdir: /app/apps/server 68 env: 69 NODE_ENV: production 70 copy: 71 - paths: 72 - . 73 target: /app/ 74 - fromBuilder: install 75 paths: 76 - /app/node_modules 77 target: /app/node_modules 78 run: 79 - bun build --compile --sourcemap src/index.ts --outfile=app 80 fromImage: 81 path: debian 82 digest: sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734 83 label: 84 org.opencontainers.image.vendor: OpenStatus 85 org.opencontainers.image.base.digest: sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734 86 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus 87 org.opencontainers.image.description: REST API server with Hono framework for OpenStatus 88 org.opencontainers.image.authors: OpenStatus Team 89 org.opencontainers.image.base.name: docker.io/debian:bullseye-slim 90 io.dofigen.version: 2.6.0 91 org.opencontainers.image.title: OpenStatus Server 92 user: 93 user: '1000' 94 group: '1000' 95 copy: 96 - fromBuilder: build 97 paths: 98 - /app/apps/server/app 99 target: /bin/ 100 chmod: '555' 101 root: 102 run: 103 - apt-get update 104 - apt-get install -y --no-install-recommends curl 105 - rm -rf /var/lib/apt/lists/* 106 entrypoint: 107 - /bin/app 108 expose: 109 - port: 3000 110 healthcheck: 111 cmd: curl -f http://localhost:3000/ping || exit 1 112 interval: 30s 113 timeout: 10s 114 start: 30s 115 retries: 3 116images: 117 docker.io: 118 library: 119 debian: 120 bullseye-slim: 121 digest: sha256:b32674fb57780ad57d7b0749242d3f585f462f4ec4a60ae0adacd945f9cb9734 122 oven: 123 bun: 124 1.3.6: 125 digest: sha256:f20d9cf365ab35529384f1717687c739c92e6f39157a35a95ef06f4049a10e4a 126resources: 127 dofigen.yml: 128 hash: 7e47c3833d499c7394c76a65c785330d2c16fc1b1b29b423fc71a6ec4feccd14 129 content: | 130 # Files to exclude from Docker context 131 ignore: 132 - node_modules 133 - /apps/docs 134 - /apps/screenshot-service 135 - /apps/web 136 - /apps/dashboard 137 - /apps/status-page 138 - /apps/workflows 139 - /packages/api 140 - /packages/integrations/vercel 141 142 builders: 143 # Stage 1: Install production dependencies 144 install: 145 fromImage: oven/bun:1.3.6 146 workdir: /app/ 147 labels: 148 org.opencontainers.image.stage: install 149 bind: 150 - bunfig.toml 151 - package.json 152 - apps/server/package.json 153 - packages/analytics/package.json 154 - packages/db/package.json 155 - packages/proto/package.json 156 - packages/emails/package.json 157 - packages/error/package.json 158 - packages/regions/package.json 159 - packages/tinybird/package.json 160 - packages/tracker/package.json 161 - packages/upstash/package.json 162 - packages/utils/package.json 163 - packages/tsconfig/package.json 164 - packages/assertions/package.json 165 - packages/theme-store/package.json 166 run: bun install --production --frozen-lockfile --verbose 167 cache: 168 - /root/.bun/install/cache 169 170 # Stage 2: Build application (compile to binary) 171 build: 172 fromImage: oven/bun:1.3.6 173 workdir: /app/apps/server 174 labels: 175 org.opencontainers.image.stage: build 176 env: 177 NODE_ENV: production 178 copy: 179 - . /app/ 180 - fromBuilder: install 181 source: /app/node_modules 182 target: /app/node_modules 183 run: bun build --compile --sourcemap src/index.ts --outfile=app 184 185 # Runtime stage 186 fromImage: debian:bullseye-slim 187 188 # Metadata labels 189 labels: 190 org.opencontainers.image.title: OpenStatus Server 191 org.opencontainers.image.description: REST API server with Hono framework for OpenStatus 192 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus 193 org.opencontainers.image.vendor: OpenStatus 194 org.opencontainers.image.authors: OpenStatus Team 195 196 # Copy compiled binary 197 copy: 198 - fromBuilder: build 199 source: /app/apps/server/app 200 target: /bin/ 201 chmod: "555" 202 203 # Install curl for health checks 204 root: 205 run: 206 - apt-get update 207 - apt-get install -y --no-install-recommends curl 208 - rm -rf /var/lib/apt/lists/* 209 210 # Security: run as non-root user 211 user: "1000:1000" 212 213 # Expose port 214 expose: "3000" 215 216 # Health check 217 healthcheck: 218 interval: 30s 219 timeout: 10s 220 start: 30s 221 retries: 3 222 cmd: curl -f http://localhost:3000/ping || exit 1 223 224 # Start application 225 entrypoint: /bin/app