66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
# /opt/stacks/flowise/docker-compose.yml
|
|
|
|
services:
|
|
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: '${POSTGRES_USER}'
|
|
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
|
|
POSTGRES_DB: flowise
|
|
TZ: Europe/Madrid
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d flowise"]
|
|
interval: 10s
|
|
timeout: 5s # Afegit: timeout explícit
|
|
retries: 5
|
|
start_period: 30s # Afegit: marge per a l'arrencada inicial
|
|
networks:
|
|
- flowise-net
|
|
|
|
flowise:
|
|
image: flowiseai/flowise:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:3000" # Interfície web (només local → via Nginx)
|
|
environment:
|
|
TZ: Europe/Madrid
|
|
# Base de dades
|
|
DATABASE_TYPE: postgres
|
|
DATABASE_HOST: postgres
|
|
DATABASE_PORT: 5432
|
|
DATABASE_NAME: flowise
|
|
DATABASE_USER: '${POSTGRES_USER}'
|
|
DATABASE_PASSWORD: '${POSTGRES_PASSWORD}'
|
|
# Autenticació
|
|
FLOWISE_USERNAME: '${FLOWISE_USERNAME}'
|
|
FLOWISE_PASSWORD: '${FLOWISE_PASSWORD}'
|
|
# Seguretat — CRÍTIC: fes backup d'aquesta clau!
|
|
FLOWISE_SECRETKEY_OVERWRITE: '${FLOWISE_SECRETKEY}'
|
|
# Paths i logs
|
|
APIKEY_PATH: /root/.flowise
|
|
SECRETKEY_PATH: /root/.flowise
|
|
LOG_LEVEL: info
|
|
LOG_PATH: /root/.flowise/logs
|
|
volumes:
|
|
- flowise_data:/root/.flowise
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- flowise-net
|
|
- shared_net
|
|
|
|
volumes:
|
|
postgres_data:
|
|
flowise_data:
|
|
|
|
networks:
|
|
flowise-net:
|
|
driver: bridge
|
|
shared_net:
|
|
external: true
|
|
name: shared_net |