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