-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (39 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
54 lines (39 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# === Build stage (secrets available, discarded after build) ===
FROM node:24-alpine AS build
ARG NUXT_PUBLIC_STUDIO_TOKENS
ARG REDIS_HOST
ARG REDIS_PASSWORD
ARG MINIO_URL
ARG MINIO_ACCESS_KEY
ARG MINIO_SECRET_KEY
ARG CHROME_TOKEN
ENV NITRO_PRESET=node-server
ENV NODE_OPTIONS=--max-old-space-size=4096
ENV NUXT_PUBLIC_STUDIO_TOKENS=${NUXT_PUBLIC_STUDIO_TOKENS}
ENV REDIS_HOST=${REDIS_HOST}
ENV REDIS_PASSWORD=${REDIS_PASSWORD}
ENV MINIO_URL=${MINIO_URL}
ENV MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
ENV MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
ENV CHROME_TOKEN=${CHROME_TOKEN}
# Install build dependencies
RUN apk add --no-cache \
python3 \
make \
g++ \
sqlite-dev \
&& ln -sf python3 /usr/bin/python
WORKDIR /app
RUN npm install -g pnpm
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
# === Runtime stage (clean, no secrets in any layer) ===
FROM node:24-alpine
WORKDIR /app
COPY --from=build /app/.output .output
ENV HOST=0.0.0.0
ENV PORT=3000
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]