routes/ 하위 파일에서 ../../../shared/는 /usr/shared를 참조. 기존 /usr/src/shared 심링크만으로 부족. /usr/shared 추가. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
26 lines
670 B
Docker
26 lines
670 B
Docker
FROM node:18-alpine
|
|
|
|
RUN apk add --no-cache imagemagick libheif imagemagick-heic imagemagick-jpeg
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# shared 모듈 복사
|
|
COPY shared/ ./shared/
|
|
|
|
COPY system2-report/api/package*.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
COPY system2-report/api/ ./
|
|
|
|
RUN ln -s /usr/src/app/shared /usr/src/shared && ln -s /usr/src/app/shared /usr/shared
|
|
RUN mkdir -p logs uploads
|
|
RUN chown -R node:node /usr/src/app
|
|
USER node
|
|
|
|
EXPOSE 3005
|
|
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=20s --retries=3 \
|
|
CMD node -e "require('http').get('http://localhost:3005/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1); })"
|
|
|
|
CMD ["node", "index.js"]
|