Skip to content

Commit ea54970

Browse files
committed
coolifyではgitがコンテキストに与えられない代わりに環境変数SOURCE_COMMITがある
1 parent d487649 commit ea54970

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile をベースに
22

3+
# (TODO?) 本来は ARG で各種環境変数を記述してビルド時に与えられるようにする必要がある。
4+
# 現在このdockerfileはcoolify上でのビルドのみに使用しており、coolifyが自動的にARG文を挿入するため動作している。
5+
36
FROM node:lts-slim AS dependencies
47

58
WORKDIR /app

next.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ export default withSentryConfig(nextConfig, {
189189
sentryUrl: process.env.SENTRY_URL,
190190
// debug: true, // important for debugging
191191

192+
// coolifyではgitがコンテキストに与えられない代わりに環境変数SOURCE_COMMITがある
193+
...(process.env.SOURCE_COMMIT
194+
? { release: { name: process.env.SOURCE_COMMIT } }
195+
: {}),
196+
192197
// Use a fixed route (recommended)
193198
tunnelRoute: "/monitoring",
194199
// Pass the auth token

0 commit comments

Comments
 (0)