docker: build fixes

This commit is contained in:
Aidan 2025-04-17 15:16:27 -04:00
parent b41d3809e9
commit 79540a6830
2 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -4,4 +4,5 @@ services:
ports: ports:
- 3000:3000 - 3000:3000
volumes: volumes:
- .:/app - .:/app
- /app/.next