-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
119 lines (108 loc) · 2.86 KB
/
docker-compose.yml
File metadata and controls
119 lines (108 loc) · 2.86 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
# Kompletny system LLM Email Distribution
version: '3.8'
services:
# LLM Code Generator Service
llm-generator:
build:
context: ./llm-generator
dockerfile: Dockerfile
container_name: llm-generator
environment:
- LLM_PROVIDER=ollama # openai, anthropic, ollama
- OLLAMA_URL=http://ollama:11434 # Using the default Ollama port
- REDIS_URL=redis://redis:6379
- SMTP_SERVICE_URL=http://smtp-service:5000
- API_TOKEN=${API_TOKEN} # Add API token for authentication
ports:
- "${LLM_GENERATOR_PORT}"
depends_on:
- redis
- ollama
volumes:
- ./templates:/app/templates
- ./generated:/app/generated
networks:
- llm-network
# Local LLM Service (Ollama)
ollama:
image: ollama/ollama:latest
container_name: ollama-llm
ports:
- "${OLLAMA_PORT}"
volumes:
- ollama_data:/root/.ollama
environment:
- OLLAMA_HOST=0.0.0.0
networks:
- llm-network
# Start the Ollama service and pull the llama2 model
entrypoint: "/bin/sh"
command: >
-c "ollama serve &
sleep 5 &&
echo 'Pulling llama2 model...' &&
ollama pull llama2 &&
echo 'Model pull complete. Ready for requests.' &&
wait"
# SMTP Distribution Service
smtp-service:
build:
context: ./smtp-service
dockerfile: Dockerfile
container_name: smtp-distribution
environment:
- SMTP_HOST=${SMTP_HOST:-smtp.gmail.com}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER=${SMTP_USER}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_USE_TLS=${SMTP_USE_TLS:-true}
- REDIS_URL=redis://redis:6379
- WEBHOOK_SECRET=${WEBHOOK_SECRET:-secret123}
ports:
- "${SMTP_SERVICE_PORT}"
depends_on:
- redis
volumes:
- ./email-templates:/app/templates
- ./attachments:/app/attachments
networks:
- llm-network
# Redis for job queue and caching
redis:
image: redis:7-alpine
container_name: redis-cache
ports:
- "6379:6379" # Redis default port, not changed in .env
volumes:
- redis_data:/data
networks:
- llm-network
# MailHog for local SMTP testing
mailhog:
image: mailhog/mailhog:latest
container_name: mailhog-smtp
ports:
- "${MAILHOG_SMTP_PORT}"
- "${MAILHOG_WEB_PORT}" # Web UI
networks:
- llm-network
# Webhook receiver for testing
webhook-receiver:
build:
context: ./webhook-receiver
dockerfile: Dockerfile
container_name: webhook-receiver
environment:
- LLM_SERVICE_URL=http://llm-generator:8000 # Updated to use internal Docker network
- FLASK_ENV=development
- API_TOKEN=${API_TOKEN}
ports:
- "${WEBHOOK_RECEIVER_PORT}"
networks:
- llm-network
volumes:
ollama_data:
redis_data:
networks:
llm-network:
driver: bridge