Repository navigation
Expand file tree
/
Copy pathdocker-compose.prod.example.yml
More file actions
156 lines (133 loc) · 3.73 KB
/
Copy pathdocker-compose.prod.example.yml
File metadata and controls
156 lines (133 loc) · 3.73 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
144
145
146
147
148
149
150
151
152
153
154
155
156
# networks:
# default:
# name: botnet
services:
app_streamlit:
image: ghcr.io/virtuos/askuos # Provide the version you want to deploy
command: >
bash -c "
streamlit run ./ui/start.py --server.port 8501
"
env_file:
- .env.prod
depends_on:
- redis
restart: always
volumes:
- logs:/app/logs
- ./config.toml:/app/ui/.streamlit/config.toml
- ./backend_config.yaml:/app/src/backend_config.yaml
- ./ui_config.yml:/app/ui/ui_config.yml
app_worker:
image: ghcr.io/virtuos/askuos # Provide the version you want to deploy
command: >
bash -c "
uvicorn src.api.main:app --host 0.0.0.0 --port 8000
"
deploy:
replicas: 3 # Depends on expected traffic and resources available.
env_file:
- .env.prod
depends_on:
- redis
restart: always
volumes:
- logs:/app/logs
- ./backend_config.yaml:/app/src/backend_config.yaml
redis:
container_name: ask_uos_redis
image: redis:latest
volumes:
- redis-data:/data
ports:
- "6379"
restart: always
command: >
--maxmemory 6144mb
--maxmemory-policy allkeys-lru
--maxmemory-samples 5
# Adjust maxmemory based on your server RAM:
# 4GB server -> 4096mb
# 8GB server -> 6144mb
# 16GB+ server -> 8192mb or more
crawl4ai:
image: unclecode/crawl4ai:0.8.0
container_name: ask_uos_crawl4ai
ports:
- "11235"
restart: always
# Optional: Caddy reverse proxy (uncomment and configure if needed)
caddy:
image: docker.io/library/caddy:2.8.4-alpine
container_name: caddy
restart: always
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./datenschutz.html:/var/www/html/datenschutz.html
- ./impressum.html:/var/www/html/impressum.html
- caddy_data:/data
- caddy_config:/config
ports:
- "80:80"
- "443:443"
depends_on:
- app
# Optional: Monitoring services (Need to be configured separately)
# You need to create promtail-config.yml and config_loki.yml
# These services are optional and have nothing to do with the chatbot's main functionality
node_exporter:
image: docker.io/prom/node-exporter:v1.8.2
container_name: node_exporter
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--path.rootfs=/rootfs'
- '--collector.filesystem.ignored-mount-points="^(/rootfs|/host|)/(sys|proc|dev|host|etc)($$|/)"'
- '--collector.filesystem.ignored-fs-types="^(sys|proc|auto|cgroup|devpts|ns|au|fuse\.lxc|mqueue)(fs|)$$"'
promtail:
image: grafana/promtail:3.2.1
container_name: promtail
volumes:
- ./promtail-config.yml:/etc/promtail/config.yaml
- logs:/app/logs
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
command: -config.file=/etc/promtail/config.yaml
restart: always
networks:
- default
loki:
image: grafana/loki:latest
ports:
- "3100"
command: -config.file=/etc/loki/local-config.yaml
restart: always
volumes:
- ./config_loki.yml:/etc/loki/local-config.yaml
networks:
- default
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
restart: always
ports:
- "8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
depends_on:
- redis
volumes:
caddy_data:
caddy_config:
logs:
redis-data: