-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (73 loc) · 1.85 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (73 loc) · 1.85 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
services:
db:
image: postgres:16
# Modifica: nome container aggiornato
container_name: petunia_db
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- ./data/db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 5s
timeout: 3s
retries: 5
networks:
# Modifica: nome rete aggiornato
- petunia_net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
app:
build: .
# Modifica: nome container aggiornato
container_name: petunia_app
restart: "no"
user: "${UID}:${GID}"
env_file:
- .env
depends_on:
db:
condition: service_healthy
volumes:
# Data Persistence
- ./data:/app/data
# Secret Injection (Mounting the credentials folder)
- ./config/credentials:/app/config/credentials
- ./logs:/app/logs
- ./config:/app/config
networks:
- petunia_net
dashboard:
build: .
container_name: petunia_dashboard
# Sovrascriviamo il comando di default: avvia Streamlit
command: streamlit run dashboard/🌸_Home.py --server.port=8501 --server.address=0.0.0.0
restart: unless-stopped
ports:
- "8501:8501" # Espone la porta web
user: "${UID}:${GID}"
volumes:
- .:/app # Hot-reload del codice
- ./data:/app/data # Accesso ai dati (DB e Backtest)
- ./config:/app/config
env_file:
- .env
environment:
- PYTHONPATH=/app
depends_on:
db:
condition: service_healthy
networks:
- petunia_net
networks:
# Modifica: definizione rete aggiornata
petunia_net:
driver: bridge