mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 04:25:39 +01:00
add arm support
This commit is contained in:
parent
9ee6fb994c
commit
d916ebef5c
6 changed files with 8321 additions and 33 deletions
24
Dockerfile
24
Dockerfile
|
|
@ -1,16 +1,20 @@
|
|||
FROM node:18-slim as base
|
||||
RUN npm i -g pnpm
|
||||
RUN apt-get update && apt-get install -y openssl libssl-dev
|
||||
# RUN apk add --no-cache openssl libc6-compat openssl1.1-compat-dev
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM node:16-alpine AS deps
|
||||
FROM base AS deps
|
||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install --frozen-lockfile
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Rebuild the source code only when needed
|
||||
FROM node:16-alpine AS builder
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
|
||||
ARG DATABASE_TYPE
|
||||
ARG BASE_PATH
|
||||
|
|
@ -20,10 +24,10 @@ ENV BASE_PATH $BASE_PATH
|
|||
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
RUN yarn build-docker
|
||||
RUN pnpm build-docker
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
FROM node:16-alpine AS runner
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
|
@ -32,7 +36,7 @@ ENV NEXT_TELEMETRY_DISABLED 1
|
|||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
RUN yarn add npm-run-all dotenv prisma
|
||||
RUN pnpm i npm-run-all dotenv prisma
|
||||
|
||||
# You only need to copy next.config.js if you are NOT using the default configuration
|
||||
COPY --from=builder /app/next.config.js .
|
||||
|
|
@ -52,4 +56,4 @@ EXPOSE 3000
|
|||
|
||||
ENV PORT 3000
|
||||
|
||||
CMD ["yarn", "start-docker"]
|
||||
CMD ["pnpm", "start-docker"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue