Make Docker Compose Coolify-ready

This commit is contained in:
2026-02-20 22:41:21 -05:00
parent 6e299b1e1f
commit 575bf91ecd
6 changed files with 48 additions and 15 deletions

View File

@@ -9,6 +9,8 @@ RUN npm install
# Build
FROM base AS builder
ARG NEXT_PUBLIC_API_URL=http://backend:3001
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN mkdir -p public && npm run build
@@ -18,6 +20,8 @@ FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
ARG NEXT_PUBLIC_API_URL=http://backend:3001
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs