-
Notifications
You must be signed in to change notification settings - Fork 47
/
Dockerfile
37 lines (25 loc) · 619 Bytes
/
Dockerfile
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
# Install modules
FROM node:lts-slim as modules
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
# Transpile Typescript
FROM node:lts-slim as build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY tsconfig.json .
COPY tsoa.json .
COPY scripts/ ./scripts/
COPY src ./src
RUN npm run build
# Export image
FROM node:lts-slim
WORKDIR /app
RUN mkdir -p .well-known
COPY .well-known/ai-plugin.json ./.well-known/ai-plugin.json
COPY --from=modules ./app .
COPY --from=build ./app/lib ./lib
COPY --from=build ./app/openapi.yaml .
EXPOSE 3000
CMD ["node", "lib/index.js"]