forked from orlarey/faustforge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (29 loc) · 992 Bytes
/
Dockerfile
File metadata and controls
43 lines (29 loc) · 992 Bytes
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
FROM node:20-bookworm-slim AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src ./src
COPY public ./public
COPY mcp.mjs ./mcp.mjs
COPY faust-doc-index.mjs ./faust-doc-index.mjs
COPY scripts/build-faust-doc-index.mjs ./scripts/build-faust-doc-index.mjs
RUN npm run build
RUN node ./scripts/build-faust-doc-index.mjs ./dist/faust-doc-index.json
FROM docker:27-cli AS dockercli
FROM node:20-bookworm-slim AS runtime
WORKDIR /app
# Docker CLI is required to run the Faust compiler container through /var/run/docker.sock.
COPY --from=dockercli /usr/local/bin/docker /usr/local/bin/docker
ENV NODE_ENV=production
ENV PORT=3000
ENV SESSIONS_DIR=/app/sessions
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=build /app/dist ./dist
COPY --from=build /app/public ./public
COPY --from=build /app/mcp.mjs ./mcp.mjs
COPY --from=build /app/faust-doc-index.mjs ./faust-doc-index.mjs
RUN mkdir -p /app/sessions
EXPOSE 3000
CMD ["node", "dist/index.js"]