Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| afe56393e7 | |||
| b2cd26af30 |
@@ -231,9 +231,10 @@ jobs:
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Rebuild native modules
|
||||
run: npm rebuild
|
||||
run: npm rebuild --ignore-scripts
|
||||
env:
|
||||
HUSKY: "0"
|
||||
HUSKY_SKIP_INSTALL: "1"
|
||||
|
||||
- name: Build macOS distributables
|
||||
run: bun run make:macos
|
||||
@@ -272,9 +273,10 @@ jobs:
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Rebuild native modules
|
||||
run: npm rebuild
|
||||
run: npm rebuild --ignore-scripts
|
||||
env:
|
||||
HUSKY: "0"
|
||||
HUSKY_SKIP_INSTALL: "1"
|
||||
|
||||
- name: Build Windows distributables
|
||||
run: bun run make -- --platform win32
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ COPY --from=build /app/dalpuri/generated/ ./dalpuri/generated/
|
||||
COPY --from=deps /app/node_modules/ ./node_modules/
|
||||
|
||||
# Ensure pdfmake Roboto fonts are present at runtime for PDF generation.
|
||||
COPY --from=build /app/node_modules/pdfmake/build/fonts/ ./node_modules/pdfmake/build/fonts/
|
||||
COPY --from=build /app/api/node_modules/pdfmake/build/fonts/ ./node_modules/pdfmake/build/fonts/
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
|
||||
@@ -20,6 +20,11 @@ spec:
|
||||
env:
|
||||
- name: MANAGER_SOCKET_URL
|
||||
value: "http://optima-api.optima.svc.cluster.local:8671"
|
||||
- name: API_DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: api-env-secret
|
||||
key: DATABASE_URL
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: api-env-secret
|
||||
|
||||
@@ -107,6 +107,20 @@ const resolveApiDatabaseUrl = (): string => {
|
||||
if (process.env.OPTIMA_API_DATABASE_URL)
|
||||
return process.env.OPTIMA_API_DATABASE_URL;
|
||||
|
||||
// Worker/runtime fallback:
|
||||
// In Kubernetes we often provide CW via CW_DATABASE_URL and API Postgres via
|
||||
// DATABASE_URL. Only use DATABASE_URL as API when we can safely infer that.
|
||||
if (process.env.CW_DATABASE_URL && process.env.DATABASE_URL) {
|
||||
return process.env.DATABASE_URL;
|
||||
}
|
||||
|
||||
if (
|
||||
process.env.DATABASE_URL &&
|
||||
/^(postgres|postgresql):\/\//i.test(process.env.DATABASE_URL)
|
||||
) {
|
||||
return process.env.DATABASE_URL;
|
||||
}
|
||||
|
||||
const candidates = [
|
||||
resolve(import.meta.dir, "../../api/.env"),
|
||||
resolve(process.cwd(), "../api/.env"),
|
||||
|
||||
Reference in New Issue
Block a user