1234567891011121314151617181920212223242526 |
- FROM node:18 AS backend_node_modules
- RUN mkdir -p /opt/app
- WORKDIR /opt/app
- COPY backend/package.json /opt/app/package.json
- COPY backend/package-lock.json /opt/app/package-lock.json
- RUN npm install --silent
- FROM node:18 AS musare_backend
- ARG CONTAINER_MODE=production
- ENV CONTAINER_MODE=${CONTAINER_MODE}
- RUN mkdir -p /opt/app /opt/types
- WORKDIR /opt/app
- COPY backend /opt/app
- COPY .git /opt/app/.git
- COPY --from=backend_node_modules /opt/app/node_modules node_modules
- ENTRYPOINT bash -c '([[ "${CONTAINER_MODE}" == "development" ]] && npm install --silent); npm run docker:dev'
- EXPOSE 8080/tcp
- EXPOSE 8080/udp
|