31 lines
1.2 KiB
Docker
31 lines
1.2 KiB
Docker
# s2s-reasoning-engine: Node-RED 5.0 custom image
|
|
|
|
# Usa Node-RED 5.x ufficiale (immagine Alpine per dimensioni ridotte)
|
|
FROM nodered/node-red:5.0.3
|
|
|
|
# Porta di default di Node-RED (esposta in reti containerizzate)
|
|
EXPOSE 1880
|
|
|
|
# 1) Installa nodi aggiuntivi (a livello utente node-red nella cartella dati)
|
|
# - node-red-contrib-openai: integrazione nativa Chat Completions / Embeddings
|
|
# - node-red-contrib-http-logger: log HTTP opzionale
|
|
# - node-red-contrib-cache: cache in-memory per dati Aquachile (opzionale)
|
|
# - node-red-node-rbe: report-by-exception per deduplicare eventi
|
|
RUN cd /data && npm install --no-audit --no-fund \
|
|
node-red-contrib-openai@0.11.0 \
|
|
node-red-contrib-cache@1.1.1 \
|
|
node-red-node-rbe@0.5.0
|
|
|
|
# 2) Copia file di configurazione e flows iniziali
|
|
COPY settings.js /data/settings.js
|
|
COPY flows.json /data/flows.json
|
|
|
|
# 3) Imposta Node-RED per caricare flows statici + disabilita progetto e auth
|
|
# (per ambiente di sviluppo; in produzione abilitare adminAuth in settings.js)
|
|
ENV NODE_RED_FLOWS_FILE=/data/flows.json
|
|
ENV NODE_RED_CREDENTIAL_SECRET=s2s-reasoning-dev-secret
|
|
ENV FLOWS=/data/flows.json
|
|
|
|
# Avvio Node-RED
|
|
CMD ["npm", "start", "--", "--userDir", "/data", "--settings", "/data/settings.js"]
|