-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
141 lines (132 loc) · 3.26 KB
/
docker-compose.yml
File metadata and controls
141 lines (132 loc) · 3.26 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
version: '3.8'
services:
# Redis for caching and message brokering
redis:
image: redis:7-alpine
ports:
- "${REDIS_PORT}:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
restart: unless-stopped
networks:
- coboarding-network
# Browser automation service
browser:
image: mcr.microsoft.com/playwright:v1.43.0-jammy
restart: unless-stopped
shm_size: 2gb
environment:
- DISPLAY=:99
- PLAYWRIGHT_SERVER=ws://0.0.0.0:3000
ports:
- "${BROWSER_PORT}:3000"
networks:
- coboarding-network
# Main API service
coboarding-api:
build:
context: .
dockerfile: deployment/Dockerfile
env_file:
- ./.env
command: uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
ports:
- "${API_PORT}:8000"
environment:
- REDIS_URL=${REDIS_URL}
- OLLAMA_BASE_URL=http://host.docker.internal:11434
- BROWSER_WS_ENDPOINT=ws://browser:3000
- PYTHONPATH=/app:/usr/local/lib/python3.11/site-packages
volumes:
- .:/app
- /app/__pycache__
- /app/.pytest_cache
- $HOME/.local/lib/python3.11/site-packages:/usr/local/lib/python3.11/site-packages
depends_on:
- redis
- browser
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
networks:
- coboarding-network
# Web UI service
coboarding-ui:
build:
context: .
dockerfile: deployment/Dockerfile
command: streamlit run ui/app.py --server.port=8501 --server.address=0.0.0.0
ports:
- "${UI_PORT}:8501"
environment:
- REDIS_URL=redis://redis:6379
- OLLAMA_BASE_URL=http://host.docker.internal:11434
- API_URL=http://coboarding-api:8000
- PYTHONPATH=/app
volumes:
- ./ui:/app/ui
- ./data:/app/data
- /app/__pycache__
depends_on:
- coboarding-api
restart: unless-stopped
networks:
- coboarding-network
# Background worker for data cleanup
cleanup-worker:
build:
context: .
dockerfile: deployment/Dockerfile
command: python workers/data_cleanup_worker.py
environment:
- REDIS_URL=redis://redis:6379
- PYTHONPATH=/app
volumes:
- .:/app
- /app/__pycache__
depends_on:
- redis
restart: unless-stopped
networks:
- coboarding-network
# Background worker for form automation
form-worker:
build:
context: .
dockerfile: deployment/Dockerfile
command: python workers/form_automation_worker.py
environment:
- REDIS_URL=redis://redis:6379
- BROWSER_WS_ENDPOINT=ws://browser:3000
- PYTHONPATH=/app
volumes:
- .:/app
- /app/__pycache__
depends_on:
- redis
- browser
restart: unless-stopped
networks:
- coboarding-network
# Nginx reverse proxy
nginx:
image: nginx:alpine
ports:
- "${NGINX_HTTP_PORT}:80"
- "${NGINX_HTTPS_PORT}:443"
volumes:
- ./deployment/nginx.conf:/etc/nginx/nginx.conf
- ./ssl:/etc/nginx/ssl
depends_on:
- coboarding-ui
- coboarding-api
restart: unless-stopped
networks:
- coboarding-network
networks:
coboarding-network:
driver: bridge
volumes:
redis_data:
ollama_data: