mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Fixed docker build.
This commit is contained in:
parent
e7f565f143
commit
dbc9525c9c
5 changed files with 76 additions and 88 deletions
|
|
@ -12,6 +12,7 @@ FROM node:22-alpine AS builder
|
|||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
COPY docker/middleware.ts ./src
|
||||
|
||||
ARG DATABASE_TYPE
|
||||
ARG BASE_PATH
|
||||
|
|
@ -41,7 +42,7 @@ RUN set -x \
|
|||
&& apk add --no-cache curl
|
||||
|
||||
# Script dependencies
|
||||
RUN pnpm add npm-run-all dotenv prisma@6.8.2
|
||||
RUN pnpm add npm-run-all dotenv chalk semver prisma@6.16.0 @prisma/adapter-pg@6.16.0
|
||||
|
||||
# Permissions for prisma
|
||||
RUN chown -R nextjs:nodejs node_modules/.pnpm/
|
||||
|
|
@ -49,15 +50,13 @@ RUN chown -R nextjs:nodejs node_modules/.pnpm/
|
|||
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY --from=builder /app/scripts ./scripts
|
||||
COPY --from=builder /app/generated ./generated
|
||||
|
||||
# Automatically leverage output traces to reduce image size
|
||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
|
||||
# Custom routes
|
||||
RUN mv ./.next/routes-manifest.json ./.next/routes-manifest-orig.json
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue