Skip to content

Commit a1efa71

Browse files
committed
fix
1 parent 5ee6d9d commit a1efa71

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ COPY ui/ ./
5252
# Build the application
5353
RUN npm run build
5454

55+
# Ensure public directory exists (Next.js may not create it if empty)
56+
RUN mkdir -p /app/public
57+
5558
# UI runtime stage
5659
FROM node:20-alpine AS ui
5760

@@ -60,6 +63,8 @@ WORKDIR /app
6063
# Copy built application
6164
COPY --from=ui-builder /app/.next/standalone ./
6265
COPY --from=ui-builder /app/.next/static ./.next/static
66+
67+
# Copy public directory
6368
COPY --from=ui-builder /app/public ./public
6469

6570
# Expose port

ui/lib/clickhouse.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import { createClient } from "@clickhouse/client";
22

3+
const CLICKHOUSE_HOST = process.env.CLICKHOUSE_HOST || 'localhost';
4+
const CLICKHOUSE_PORT = process.env.CLICKHOUSE_PORT || '8123';
5+
const CLICKHOUSE_USER = process.env.CLICKHOUSE_USER || 'default';
6+
const CLICKHOUSE_PASSWORD = process.env.CLICKHOUSE_PASSWORD || '';
7+
const CLICKHOUSE_DATABASE = process.env.CLICKHOUSE_DATABASE || 'default';
8+
39
const client = createClient({
4-
url: `https://${process.env.CLICKHOUSE_HOST}:${process.env.CLICKHOUSE_PORT}`,
5-
username: process.env.CLICKHOUSE_USER,
6-
password: process.env.CLICKHOUSE_PASSWORD,
7-
database: process.env.CLICKHOUSE_DATABASE,
10+
url: `https://${CLICKHOUSE_HOST}:${CLICKHOUSE_PORT}`,
11+
username: CLICKHOUSE_USER,
12+
password: CLICKHOUSE_PASSWORD,
13+
database: CLICKHOUSE_DATABASE,
814
request_timeout: 300000, // 5 minutes
915
});
1016

0 commit comments

Comments
 (0)