worker mejorado
Some checks failed
build-and-push / build (push) Successful in 1m36s
build-and-push / deploy (push) Failing after 14s

This commit is contained in:
2025-05-14 16:23:36 -06:00
parent 1372535938
commit 0c170bfa1a
4 changed files with 18 additions and 8 deletions

View File

@@ -1,7 +1,17 @@
# planilla/api/Dockerfile
FROM node:18-alpine
# base liviano con Node y cron
FROM node:20-alpine
# instala cronie
RUN apk add --no-cache cronie
WORKDIR /app
COPY package*.json ./
RUN npm install
RUN npm ci --omit=dev # solo deps prod
COPY . .
CMD ["`npm", "start"]
# scripts de sistema: se lanzan por cronie
COPY cron/ /etc/periodic/
RUN chmod +x /etc/periodic/*/*
# arranca cron (en background) y luego Node
CMD sh -c "crond -l 2 & node cron-worker.js"