docker: build fixes
This commit is contained in:
parent
b41d3809e9
commit
79540a6830
17
Dockerfile
17
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM oven/bun:1
|
||||
FROM oven/bun:1 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@ -10,19 +10,18 @@ COPY . .
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
# Build the application
|
||||
RUN bun run build
|
||||
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
# Final stage
|
||||
FROM oven/bun:1
|
||||
|
||||
# Public folder not used at the moment
|
||||
# COPY --from=builder /app/public ./public
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME="0.0.0.0"
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
@ -4,4 +4,5 @@ services:
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- .:/app
|
||||
- .:/app
|
||||
- /app/.next
|
Loading…
x
Reference in New Issue
Block a user