25 lines
432 B
Plaintext
25 lines
432 B
Plaintext
FROM node:16-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci --only=production && npm cache clean --force
|
|
|
|
# Copy source code
|
|
COPY tsconfig.json tsconfig.json
|
|
COPY src src
|
|
|
|
RUN npm install -g typescript
|
|
RUN npm install
|
|
RUN tsc
|
|
|
|
|
|
FROM node:16-alpine
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/package*.json ./
|
|
COPY --from=builder /app/dist ./dist
|
|
COPY data data
|
|
RUN npm install
|
|
|
|
EXPOSE 8008
|
|
CMD ["node", "dist/index.js"] |