Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

Fix Docker Not Copy SQLite (#1665)

Muhammad Tamir6eb5d663b0aa
diff --git a/Dockerfile b/Dockerfile
index e6c334e294..8ca152fb1c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -46,6 +46,11 @@ COPY --from=builder /app/node_modules/@swc/helpers ./node_modules/@swc/helpers
COPY --from=builder /app/node_modules/pino-abstract-transport ./node_modules/pino-abstract-transport
COPY --from=builder /app/node_modules/pino-pretty ./node_modules/pino-pretty
COPY --from=builder /app/node_modules/split2 ./node_modules/split2
+# Migration SQL files are read via fs.readFileSync at runtime and are NOT
+# traced by Next.js standalone output — copy them explicitly.
+COPY --from=builder /app/src/lib/db/migrations ./migrations
+ENV OMNIROUTE_MIGRATIONS_DIR=/app/migrations
+
COPY --from=builder /app/scripts/run-standalone.mjs ./run-standalone.mjs
COPY --from=builder /app/scripts/runtime-env.mjs ./runtime-env.mjs
COPY --from=builder /app/scripts/bootstrap-env.mjs ./bootstrap-env.mjs
diff --git a/next.config.mjs b/next.config.mjs
index 2973459f9f..b1e835a4ae 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -33,6 +33,11 @@ const nextConfig = {
},
},
outputFileTracingRoot: projectRoot,
+ outputFileTracingIncludes: {
+ // Migration SQL files are read via fs.readFileSync at runtime and are NOT
+ // auto-traced by webpack/turbopack — include them explicitly.
+ "/*": ["./src/lib/db/migrations/**/*"],
+ },
outputFileTracingExcludes: {
// Planning/task docs are not runtime assets and can break standalone copies
// when broad fs/path tracing pulls the whole repository into the NFT graph.