Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Commit 567927d

Browse files
authored
Merge pull request #287 from X2bee/feature/hello
refactor: Update Dockerfile to use build arguments for backend host a…
2 parents 50bdc88 + 44c9d70 commit 567927d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ RUN npm ci
1111
COPY . .
1212

1313
# Build arguments for environment variables (needed at build time for Next.js)
14-
ARG NEXT_PUBLIC_BACKEND_HOST=http://host.docker.internal
15-
ARG NEXT_PUBLIC_BACKEND_PORT=8023
14+
ARG NEXT_PUBLIC_BACKEND_HOST
15+
ARG NEXT_PUBLIC_BACKEND_PORT
1616
ARG NEXT_PUBLIC_METRICS_HOST
1717

1818
# Set environment variables for build
@@ -37,8 +37,9 @@ RUN adduser --system --uid 1001 nextjs
3737

3838
# Copy necessary files from builder
3939
COPY --from=builder /app/public ./public
40-
COPY --from=builder /app/.next/standalone ./
41-
COPY --from=builder /app/.next/static ./.next/static
40+
COPY --from=builder /app/.next ./.next
41+
COPY --from=builder /app/node_modules ./node_modules
42+
COPY --from=builder /app/package.json ./package.json
4243

4344
# Set correct permissions
4445
RUN chown -R nextjs:nodejs /app
@@ -49,4 +50,4 @@ EXPOSE 3000
4950
ENV PORT=3000
5051
ENV HOSTNAME="0.0.0.0"
5152

52-
CMD ["node", "server.js"]
53+
CMD ["npm", "start"]

next.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { NextConfig } from 'next';
22

33
const nextConfig: NextConfig = {
4-
output: 'standalone',
54
experimental: {
65
proxyTimeout: 600000,
76
},

0 commit comments

Comments
 (0)