Openstatus
www.openstatus.dev
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:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
17 label:
18 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3
19 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
20 org.opencontainers.image.stage: install
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/emails/package.json
38 source: packages/emails/package.json
39 - target: packages/error/package.json
40 source: packages/error/package.json
41 - target: packages/regions/package.json
42 source: packages/regions/package.json
43 - target: packages/tinybird/package.json
44 source: packages/tinybird/package.json
45 - target: packages/tracker/package.json
46 source: packages/tracker/package.json
47 - target: packages/upstash/package.json
48 source: packages/upstash/package.json
49 - target: packages/utils/package.json
50 source: packages/utils/package.json
51 - target: packages/tsconfig/package.json
52 source: packages/tsconfig/package.json
53 - target: packages/assertions/package.json
54 source: packages/assertions/package.json
55 - target: packages/theme-store/package.json
56 source: packages/theme-store/package.json
57 build:
58 fromImage:
59 path: oven/bun
60 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
61 label:
62 org.opencontainers.image.base.name: docker.io/oven/bun:1.3.3
63 org.opencontainers.image.stage: build
64 org.opencontainers.image.base.digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
65 workdir: /app/apps/server
66 env:
67 NODE_ENV: production
68 copy:
69 - paths:
70 - .
71 target: /app/
72 - fromBuilder: install
73 paths:
74 - /app/node_modules
75 target: /app/node_modules
76 run:
77 - bun build --compile --sourcemap src/index.ts --outfile=app
78 fromImage:
79 path: debian
80 digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
81 label:
82 org.opencontainers.image.vendor: OpenStatus
83 org.opencontainers.image.title: OpenStatus Server
84 org.opencontainers.image.description: REST API server with Hono framework for OpenStatus
85 io.dofigen.version: 2.5.1
86 org.opencontainers.image.source: https://github.com/openstatusHQ/openstatus
87 org.opencontainers.image.base.digest: sha256:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
88 org.opencontainers.image.authors: OpenStatus Team
89 org.opencontainers.image.base.name: docker.io/debian:bullseye-slim
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:530a3348fc4b5734ffe1a137ddbcee6850154285251b53c3425c386ea8fac77b
120 oven:
121 bun:
122 1.3.3:
123 digest: sha256:fbf8e67e9d3b806c86be7a2f2e9bae801f2d9212a21db4dcf8cc9889f5a3c9c4
124resources:
125 dofigen.yml:
126 hash: f2069730c7b0f5e8be704cbfc3ae77ac031f05b2a3b916bcbe758f7955edfa5e
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.3
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.3
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