Add missing library files and update Dockerfile for module import

This commit is contained in:
2026-10-08 23:24:07 +03:00
parent 4a0785d003
commit 1f91283ecd

View File

@@ -12,6 +12,8 @@ COPY package*.json ./
RUN npm ci --omit=dev --no-audit --no-fund
COPY --from=build /app/dist ./dist
COPY server ./server
COPY --from=build /app/src/lib/timetable.mjs /app/src/lib/weather.mjs ./src/lib/
RUN node --input-type=module -e "await import('./server/index.mjs')"
USER node
EXPOSE 5180
HEALTHCHECK --interval=30s --timeout=5s CMD node -e "fetch('http://127.0.0.1:5180/healthz').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"