YoruAkio commited on
Commit
2fe3317
Β·
1 Parent(s): 40c02d6

fix: update Dockerfile and start script for simplified frontend structure

Browse files
Files changed (2) hide show
  1. Dockerfile +8 -8
  2. start.sh +1 -1
Dockerfile CHANGED
@@ -3,11 +3,11 @@ FROM oven/bun:latest as frontend-builder
3
  # Set working directory for frontend
4
  WORKDIR /build
5
  # Copy frontend package files from the correct path
6
- COPY frontend/lumakit-frontend/package.json frontend/lumakit-frontend/bun.lockb* ./
7
  # Install ALL dependencies (including Next.js)
8
  RUN bun install
9
  # Copy frontend source
10
- COPY frontend/lumakit-frontend/ ./
11
  # Build the Next.js app
12
  RUN bun run build
13
 
@@ -25,14 +25,14 @@ RUN bun install --production
25
  COPY --chown=1000:1000 src/ ./src/
26
 
27
  # Create frontend directory structure
28
- RUN mkdir -p ./frontend/lumakit-frontend
29
 
30
  # Copy built Next.js app AND node_modules from builder stage
31
- COPY --from=frontend-builder --chown=1000:1000 /build/.next ./frontend/lumakit-frontend/.next
32
- COPY --from=frontend-builder --chown=1000:1000 /build/public ./frontend/lumakit-frontend/public
33
- COPY --from=frontend-builder --chown=1000:1000 /build/package.json ./frontend/lumakit-frontend/package.json
34
- COPY --from=frontend-builder --chown=1000:1000 /build/next.config.mjs ./frontend/lumakit-frontend/next.config.mjs
35
- COPY --from=frontend-builder --chown=1000:1000 /build/node_modules ./frontend/lumakit-frontend/node_modules
36
 
37
  # Create necessary directories and set permissions
38
  RUN mkdir -p /app/logs /app/temp
 
3
  # Set working directory for frontend
4
  WORKDIR /build
5
  # Copy frontend package files from the correct path
6
+ COPY frontend/package.json frontend/bun.lockb* ./
7
  # Install ALL dependencies (including Next.js)
8
  RUN bun install
9
  # Copy frontend source
10
+ COPY frontend/ ./
11
  # Build the Next.js app
12
  RUN bun run build
13
 
 
25
  COPY --chown=1000:1000 src/ ./src/
26
 
27
  # Create frontend directory structure
28
+ RUN mkdir -p ./frontend
29
 
30
  # Copy built Next.js app AND node_modules from builder stage
31
+ COPY --from=frontend-builder --chown=1000:1000 /build/.next ./frontend/.next
32
+ COPY --from=frontend-builder --chown=1000:1000 /build/public ./frontend/public
33
+ COPY --from=frontend-builder --chown=1000:1000 /build/package.json ./frontend/package.json
34
+ COPY --from=frontend-builder --chown=1000:1000 /build/next.config.mjs ./frontend/next.config.mjs
35
+ COPY --from=frontend-builder --chown=1000:1000 /build/node_modules ./frontend/node_modules
36
 
37
  # Create necessary directories and set permissions
38
  RUN mkdir -p /app/logs /app/temp
start.sh CHANGED
@@ -13,7 +13,7 @@ trap cleanup SIGTERM SIGINT
13
 
14
  # Start Next.js frontend in the background on port 7860
15
  echo "Starting LumaKit Frontend on port 7860..."
16
- cd /app/frontend/lumakit-frontend && PORT=7860 bunx next start &
17
  FRONTEND_PID=$!
18
  echo "Frontend started with PID: $FRONTEND_PID"
19
 
 
13
 
14
  # Start Next.js frontend in the background on port 7860
15
  echo "Starting LumaKit Frontend on port 7860..."
16
+ cd /app/frontend && PORT=7860 bunx next start &
17
  FRONTEND_PID=$!
18
  echo "Frontend started with PID: $FRONTEND_PID"
19