-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 905 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (28 loc) · 905 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
# Relay AI Server + Admin UI — container-friendly (env + files, no OS keychain).
# Build: docker build -t relay-ai .
# Run: see docs/DOCKER.md / docker-compose.yml
FROM node:22-bookworm-slim AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY tsconfig.json tsup.config.ts ./
COPY src ./src
COPY assets ./assets
COPY scripts ./scripts
RUN npm run build
FROM node:22-bookworm-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production
ENV RELAY_AI_HOME=/data
ENV RELAY_AI_UI_MODE=server
ENV RELAY_AI_UI_PORT=8787
COPY package.json package-lock.json ./
RUN npm ci --omit=dev && npm cache clean --force
COPY --from=build /app/dist ./dist
RUN mkdir -p /data && chown -R node:node /app /data
USER node
EXPOSE 8787 17645
VOLUME ["/data"]
ENTRYPOINT ["node", "dist/cli.js"]
# Admin UI (providers / favorites / gateway). Start the API from the Server tab.
CMD ["ui", "--server"]