docker
This commit is contained in:
parent
432f203702
commit
f4104e4366
1 changed files with 6 additions and 8 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -16,15 +16,13 @@ COPY . .
|
|||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NODE_ENV=production
|
||||
|
||||
ARG DATABASE_URI
|
||||
ARG PAYLOAD_SECRET
|
||||
ARG NEXT_PUBLIC_SERVER_URL
|
||||
ENV DATABASE_URI=$DATABASE_URI
|
||||
ENV PAYLOAD_SECRET=$PAYLOAD_SECRET
|
||||
ENV NEXT_PUBLIC_SERVER_URL=$NEXT_PUBLIC_SERVER_URL
|
||||
# Dummy values for build time (overridden at runtime by Dokploy env vars)
|
||||
ENV DATABASE_URI=mongodb://localhost:27017/build-placeholder
|
||||
ENV PAYLOAD_SECRET=build-time-placeholder
|
||||
ENV NEXT_PUBLIC_SERVER_URL=http://localhost:3002
|
||||
|
||||
RUN pnpm payload generate:types || echo "Skipped"
|
||||
RUN pnpm next build
|
||||
RUN pnpm next build --experimental-build-mode compile
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
|
@ -45,4 +43,4 @@ EXPOSE 3002
|
|||
ENV PORT=3002
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["node", "server.js"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue