Openstatus www.openstatus.dev
at main 180 lines 5.3 kB view raw
1effective: | 2 builders: 3 builder: 4 fromImage: 5 path: node 6 digest: sha256:0afb7822fac7bf9d7c1bf3b6e6c496dee6b2b64d8dfa365501a3c68e8eba94b2 7 label: 8 org.opencontainers.image.base.name: docker.io/node:24-slim 9 org.opencontainers.image.base.digest: sha256:0afb7822fac7bf9d7c1bf3b6e6c496dee6b2b64d8dfa365501a3c68e8eba94b2 10 workdir: /app 11 env: 12 PATH: $PNPM_HOME:$PATH 13 CRON_SECRET: test 14 RESEND_API_KEY: test 15 STRIPE_SECRET_KEY: test 16 TINY_BIRD_API_KEY: test 17 TEAM_ID_VERCEL: test 18 PROJECT_ID_VERCEL: test 19 SELF_HOST: 'true' 20 NODE_ENV: production 21 NEXT_PUBLIC_OPENPANEL_CLIENT_ID: test 22 OPENPANEL_CLIENT_SECRET: test 23 NEXT_PUBLIC_URL: http://localhost:3002 24 UNKEY_TOKEN: test 25 RANDOM_YOLO: YOLO 26 UPSTASH_REDIS_REST_TOKEN: test 27 UNKEY_API_ID: test 28 DATABASE_URL: http://libsql:8080 29 UPSTASH_REDIS_REST_URL: test 30 VERCEL_AUTH_BEARER_TOKEN: test 31 PNPM_HOME: /pnpm 32 DATABASE_AUTH_TOKEN: test 33 copy: 34 - paths: 35 - . 36 target: /app/ 37 run: 38 - corepack enable 39 - pnpm install --frozen-lockfile 40 - pnpm turbo run build --filter=@openstatus/status-page 41 fromImage: 42 path: node 43 digest: sha256:0afb7822fac7bf9d7c1bf3b6e6c496dee6b2b64d8dfa365501a3c68e8eba94b2 44 label: 45 org.opencontainers.image.base.digest: sha256:0afb7822fac7bf9d7c1bf3b6e6c496dee6b2b64d8dfa365501a3c68e8eba94b2 46 io.dofigen.version: 2.5.1 47 org.opencontainers.image.base.name: docker.io/node:24-slim 48 user: 49 user: '1000' 50 group: '1000' 51 workdir: /app/apps/status-page 52 copy: 53 - fromBuilder: builder 54 paths: 55 - /app/apps/status-page/.next/standalone/apps/status-page/ 56 target: ./ 57 chmod: '555' 58 - fromBuilder: builder 59 paths: 60 - /app/node_modules/ 61 target: /app/node_modules/ 62 - fromBuilder: builder 63 paths: 64 - /app/apps/status-page/.next/static/ 65 target: ./.next/static/ 66 - fromBuilder: builder 67 paths: 68 - /app/apps/status-page/public/ 69 target: ./public/ 70 root: 71 run: 72 - apt-get update 73 - apt-get install -y --no-install-recommends curl 74 - rm -rf /var/lib/apt/lists/* 75 cmd: 76 - node 77 - server.js 78 expose: 79 - port: 3000 80 healthcheck: 81 cmd: curl -f http://localhost:3000/ || exit 1 82 interval: 30s 83 timeout: 10s 84 start: 45s 85 retries: 3 86images: 87 docker.io: 88 library: 89 node: 90 24-slim: 91 digest: sha256:0afb7822fac7bf9d7c1bf3b6e6c496dee6b2b64d8dfa365501a3c68e8eba94b2 92resources: 93 dofigen.yml: 94 hash: f70082e0a301dbbeb765a67ea8826eacb69af6d0af9a85bf325cc81225611d7d 95 content: | 96 builders: 97 # Stage 1: Next.js build with Node.js 98 builder: 99 fromImage: node:24-slim 100 workdir: /app 101 copy: 102 - . /app/ 103 env: 104 NODE_ENV: production 105 PNPM_HOME: /pnpm 106 PATH: $PNPM_HOME:$PATH 107 # Build-time environment variables (placeholder values, overwritten by .env.docker at runtime) 108 SELF_HOST: "true" 109 RANDOM_YOLO: YOLO 110 DATABASE_URL: http://libsql:8080 111 DATABASE_AUTH_TOKEN: test 112 NEXT_PUBLIC_OPENPANEL_CLIENT_ID: test 113 NEXT_PUBLIC_URL: http://localhost:3002 114 TEAM_ID_VERCEL: test 115 PROJECT_ID_VERCEL: test 116 VERCEL_AUTH_BEARER_TOKEN: test 117 OPENPANEL_CLIENT_SECRET: test 118 RESEND_API_KEY: test 119 UPSTASH_REDIS_REST_URL: test 120 UPSTASH_REDIS_REST_TOKEN: test 121 UNKEY_TOKEN: test 122 UNKEY_API_ID: test 123 TINY_BIRD_API_KEY: test 124 CRON_SECRET: test 125 STRIPE_SECRET_KEY: test 126 127 run: 128 - corepack enable 129 - pnpm install --frozen-lockfile 130 - pnpm turbo run build --filter=@openstatus/status-page 131 132 # Runtime stage 133 fromImage: node:24-slim 134 workdir: /app/apps/status-page 135 136 # Copy artifacts from builder 137 copy: 138 # Copy Next.js standalone output 139 - fromBuilder: builder 140 source: /app/apps/status-page/.next/standalone/apps/status-page/ 141 target: ./ 142 chmod: "555" 143 # Copy root node_modules (required for pnpm symlinks) 144 - fromBuilder: builder 145 source: /app/node_modules/ 146 target: /app/node_modules/ 147 # Copy static assets 148 - fromBuilder: builder 149 source: /app/apps/status-page/.next/static/ 150 target: ./.next/static/ 151 # Copy public directory 152 - fromBuilder: builder 153 source: /app/apps/status-page/public/ 154 target: ./public/ 155 156 # Install curl for health checks 157 root: 158 run: 159 - apt-get update 160 - apt-get install -y --no-install-recommends curl 161 - rm -rf /var/lib/apt/lists/* 162 163 # Security: run as non-root user 164 user: "1000:1000" 165 166 # Expose port 167 expose: "3000" 168 169 # Health check 170 healthcheck: 171 interval: 30s 172 timeout: 10s 173 start: 45s 174 retries: 3 175 cmd: curl -f http://localhost:3000/ || exit 1 176 177 # Start application 178 cmd: 179 - node 180 - server.js