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