-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (134 loc) · 3.18 KB
/
docker-compose.yml
File metadata and controls
143 lines (134 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
services:
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 3s
retries: 5
networks:
- tiro-network
redis:
image: redis:7-alpine
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- "127.0.0.1:6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- tiro-network
tiro-core:
build:
context: ./tiro-core
dockerfile: Dockerfile
env_file: .env
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./tiro-core:/app
networks:
- tiro-network
celery-worker:
build:
context: ./tiro-core
dockerfile: Dockerfile
command: celery -A tiro_core.celery_app worker --loglevel=info --concurrency=2
env_file: .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./tiro-core:/app
networks:
- tiro-network
celery-beat:
build:
context: ./tiro-core
dockerfile: Dockerfile
command: celery -A tiro_core.celery_app beat --loglevel=info
env_file: .env
depends_on:
redis:
condition: service_healthy
volumes:
- ./tiro-core:/app
networks:
- tiro-network
tiro-ui:
build:
context: ./tiro-ui
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- TIRO_API_URL=http://tiro-core:8000
depends_on:
- tiro-core
networks:
- tiro-network
# Bridge WhatsApp — richiede SYS_ADMIN per bubblewrap sandbox
nanobot:
build:
context: ./nanobot
dockerfile: Dockerfile
volumes:
- nanobot_data:/home/nanobot/.nanobot
environment:
- NANOBOT_REDIS__ENABLED=true
- NANOBOT_REDIS__URL=redis://redis:6379/0
- NANOBOT_REDIS_INBOUND_CHANNEL=nanobot:messaggi
- NANOBOT_REDIS_OUTBOUND_CHANNEL=tiro:comandi:whatsapp
- GROQ_API_KEY=${GROQ_API_KEY}
ports:
- "18790:18790"
depends_on:
redis:
condition: service_healthy
cap_add:
- SYS_ADMIN
security_opt:
- apparmor=unconfined
- seccomp=unconfined
networks:
- tiro-network
# Trascrizione vocale locale — fallback per audio non-WhatsApp
whisper:
build:
context: ./whisper
dockerfile: Dockerfile
environment:
- WHISPER_MODEL=${WHISPER_MODEL:-base}
ports:
- "9000:9000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/salute"]
interval: 10s
timeout: 5s
retries: 3
start_period: 60s
networks:
- tiro-network
volumes:
postgres_data:
nanobot_data: # Sessione WhatsApp + config persistente
networks:
tiro-network:
driver: bridge