Files
aurak/server/Dockerfile
T
Developer 0a9588abb7 feat: implement QuestionBank CRUD with pagination and template query
- Add pagination support to findAll (page, limit query params)
- Add findByTemplateId method to service
- Add GET /by-template/:templateId endpoint to controller
- Service already includes CRUD for QuestionBank and QuestionBankItem
2026-04-23 17:19:11 +08:00

27 lines
623 B
Docker

FROM node:20-alpine
WORKDIR /app
# Set apk mirror and install build tools for native modules
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk add --no-cache python3 make g++ imagemagick poppler-utils ghostscript
# Copy package files
COPY package*.json yarn.lock* ./
# Set yarn registry and install all dependencies (including dev for build)
RUN yarn config set registry https://registry.npmmirror.com && \
yarn install
# Copy source code
COPY . .
# Build the application
RUN yarn build
# Expose port
EXPOSE 3001
# Start application
CMD ["node", "/app/dist/main.js"]