-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (63 loc) · 1.62 KB
/
docker-compose.yml
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
services:
redisserver:
image: redis:alpine
container_name: spamslaya-redis
restart: always
expose:
- "6379"
networks:
- internal
webapp:
build: .
container_name: spamslaya-webapp
environment:
- SPAM_SLAYA_SECRET_KEY=6oCH3RhzVAenPEuXjuVpqwb4xgDpBWbe
- SPAM_SLAYA_DATABASE_URL=sqlite:////prod/db/spamslaya.db
- SPAM_SLAYA_GOOGLE_CLIENT_SECRET_PATH=/prod/client_secret.json
- SPAM_SLAYA_RQ_BROKER_URL=redis://spamslaya-redis:6379/0
- SPAM_SLAYA_OLLAMA_URL=http://spamslaya-ollama:11434
volumes:
- ./prod/db:/prod/db
- ./client_secret.json:/prod/client_secret.json
restart: always
command: gunicorn -w 1 -b 0.0.0.0:8080 'app:create_app()'
depends_on:
- ollama
- redisserver
ports:
- "8080:8080"
networks:
- default
- internal
worker:
build: .
container_name: spamslaya-worker
environment:
- SPAM_SLAYA_DATABASE_URL=sqlite:////prod/db/spamslaya.db
- SPAM_SLAYA_RQ_BROKER_URL=redis://spamslaya-redis:6379/0
- SPAM_SLAYA_OLLAMA_URL=http://spamslaya-ollama:11434
- SPAM_SLAYA_OLLAMA_MODEL=qwen2.5:3b-instruct-q4_0
- SPAM_SLAYA_OLLAMA_API_KEY=dummy
volumes:
- ./prod/db:/prod/db
command: python worker.py
restart: always
depends_on:
- ollama
- redisserver
- webapp
networks:
- internal
ollama:
image: ollama/ollama:latest
container_name: spamslaya-ollama
expose:
- "11434"
volumes:
- ./prod/ollama:/root/.ollama
tty: true
restart: always
networks:
- internal
networks:
internal: