worker mejorado
This commit is contained in:
@@ -64,8 +64,7 @@ jobs:
|
|||||||
# ──────────────── push loop ────────────────
|
# ──────────────── push loop ────────────────
|
||||||
- name: Push images
|
- name: Push images
|
||||||
run: |
|
run: |
|
||||||
for img in planilla \
|
for img in planilla-agent \
|
||||||
planilla-agent \
|
|
||||||
planilla-api \
|
planilla-api \
|
||||||
planilla-mcp \
|
planilla-mcp \
|
||||||
planilla-ui \
|
planilla-ui \
|
||||||
@@ -85,8 +84,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Pull latest images
|
- name: Pull latest images
|
||||||
run: |
|
run: |
|
||||||
for img in planilla \
|
for img in planilla-agent \
|
||||||
planilla-agent \
|
|
||||||
planilla-api \
|
planilla-api \
|
||||||
planilla-mcp \
|
planilla-mcp \
|
||||||
planilla-ui \
|
planilla-ui \
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
# planilla/api/Dockerfile
|
# base liviano con Node y cron
|
||||||
FROM node:18-alpine
|
FROM node:20-alpine
|
||||||
|
|
||||||
|
# instala cronie
|
||||||
|
RUN apk add --no-cache cronie
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm ci --omit=dev # solo deps prod
|
||||||
COPY . .
|
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"
|
||||||
|
|||||||
2
worker/cron/15min/hello.sh
Normal file
2
worker/cron/15min/hello.sh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo "[hello] $(date) — hello world"
|
||||||
Reference in New Issue
Block a user