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
|
WORKDIR /app
|
||||||
|
|
||||||
@ -10,19 +10,18 @@ COPY . .
|
|||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
# Build the application
|
|
||||||
RUN bun run build
|
RUN bun run build
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
# Final stage
|
||||||
RUN adduser --system --uid 1001 nextjs
|
FROM oven/bun:1
|
||||||
|
|
||||||
# Public folder not used at the moment
|
WORKDIR /app
|
||||||
# COPY --from=builder /app/public ./public
|
|
||||||
|
|
||||||
|
COPY --from=builder /app /app
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV PORT=3000
|
ENV PORT=3000
|
||||||
ENV HOSTNAME="0.0.0.0"
|
|
||||||
|
|
||||||
USER nextjs
|
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
@ -4,4 +4,5 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
|
- /app/.next
|
Loading…
x
Reference in New Issue
Block a user