diff --git a/api/Dockerfile b/api/Dockerfile index 5357321..c665a92 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,8 +1,12 @@ -# planilla/api/Dockerfile FROM node:18-alpine + WORKDIR /app + COPY package*.json ./ RUN npm install + COPY . . + EXPOSE 4000 + CMD ["sh", "-c", "npx prisma migrate deploy && node server.js"] diff --git a/worker/cron-worker.js b/worker/cron-worker.js index 50d2cc2..f418590 100644 --- a/worker/cron-worker.js +++ b/worker/cron-worker.js @@ -3,6 +3,14 @@ import cron from 'node-cron'; cron.schedule('*/5 * * * * *', () => { - console.log(new Date().toLocaleString()); + const now = new Date(); + if (!isNaN(now)) { + const formatted = new Intl.DateTimeFormat('es-HN', { + dateStyle: 'full', + timeStyle: 'medium', + timeZone: 'America/Tegucigalpa', + }).format(now); + console.log('[cron]', formatted); + } });