-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (35 loc) · 1.18 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (35 loc) · 1.18 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
FROM node:20-slim
WORKDIR /app
# Prevent glibc memory fragmentation (OOM Fix)
ENV MALLOC_ARENA_MAX=2
ENV PYTHONUNBUFFERED=1
# ─── Install Meme frontend deps & build ───
COPY meme/package*.json ./meme/
RUN cd meme && npm ci
COPY meme/ ./meme/
RUN cd meme && npx vite build
# ─── Install Character frontend deps & build ───
COPY character/package*.json ./character/
RUN cd character && npm ci
COPY character/ ./character/
RUN cd character && npx vite build
# ─── Install VoiceScript frontend deps & build ───
COPY voicescript/package*.json ./voicescript/
RUN cd voicescript && npm ci
COPY voicescript/ ./voicescript/
RUN cd voicescript && npx vite build
# ─── Install Journall frontend deps & build ───
COPY journall/package*.json ./journall/
RUN cd journall && npm ci
COPY journall/ ./journall/
RUN cd journall && npx vite build
# ─── Install server deps ───
COPY server/package*.json ./server/
RUN cd server && npm ci --production
# ─── Copy server code ───
COPY server/ ./server/
# Drop to non-root user
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
USER appuser
EXPOSE ${PORT:-4500}
CMD ["node", "server/index.cjs"]