forked from Agenta-AI/agenta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
151 lines (143 loc) · 4.93 KB
/
docker-compose.test.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
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
version: '3.8'
services:
reverse-proxy:
image: traefik:v2.10
command: --api.dashboard=true --api.insecure=true --providers.docker --entrypoints.web.address=:80
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- agenta-network
backend:
build: ./agenta-backend
container_name: agenta-backend-test
environment:
- MONGODB_URI=mongodb://username:password@mongo:27017/
- REDIS_URL=redis://redis:6379/0
- ENVIRONMENT=${ENVIRONMENT}
- BARE_DOMAIN_NAME=localhost
- DOMAIN_NAME=http://localhost
- CELERY_BROKER_URL=amqp://guest@rabbitmq//
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- DATABASE_MODE=test
- FEATURE_FLAG=oss
- OPENAI_API_KEY=${OPENAI_API_KEY}
- AGENTA_TEMPLATE_REPO=agentaai/templates_v2
- POSTHOG_API_KEY=phc_hmVSxIjTW1REBHXgj2aw4HW9X6CXb6FzerBgP9XenC7
- TEMPLATES_BASE_URL=https://llm-app-json.s3.eu-central-1.amazonaws.com
- REGISTRY_REPO_NAME=agentaai
- DOCKER_HUB_URL=https://hub.docker.com/v2/repositories
volumes:
- ./agenta-backend/agenta_backend:/app/agenta_backend
- ./agenta-backend/tests:/app/tests
- /var/run/docker.sock:/var/run/docker.sock
command:
[
"uvicorn",
"agenta_backend.main:app",
"--host",
"0.0.0.0",
"--port",
"8000",
"--reload",
"--log-level",
"info",
"--root-path",
"/api"
]
labels:
- "traefik.http.routers.backend.rule=PathPrefix(`/api/`)"
- "traefik.http.routers.backend.entrypoints=web"
- "traefik.http.middlewares.backend-strip.stripprefix.prefixes=/api"
- "traefik.http.middlewares.backend-strip.stripprefix.forceslash=true"
- "traefik.http.routers.backend.middlewares=backend-strip"
- "traefik.http.services.backend.loadbalancer.server.port=8000"
- "traefik.http.routers.backend.service=backend"
depends_on:
mongo:
condition: service_healthy
extra_hosts:
- host.docker.internal:host-gateway
networks:
- agenta-network
mongo_express:
image: mongo-express:0.54.0
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: username
ME_CONFIG_MONGODB_ADMINPASSWORD: password
ME_CONFIG_MONGODB_SERVER: mongo
ports:
- "8081:8081"
networks:
- agenta-network
depends_on:
mongo:
condition: service_healthy
restart: always
mongo:
image: mongo:5.0
container_name: agenta-mongo-test
environment:
MONGO_INITDB_ROOT_USERNAME: username
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- "27017:27017"
healthcheck:
test: [ "CMD", "mongo", "--eval", "db.adminCommand('ping')" ]
interval: 10s
timeout: 10s
retries: 20
networks:
- agenta-network
redis:
image: redis:latest
container_name: agenta-redis-test
networks:
- agenta-network
volumes:
- redis_data:/data
rabbitmq:
image: rabbitmq:3-management
container_name: agenta-rabbitmq-test
ports:
- "5672:5672"
- "15672:15672"
volumes:
- ./rabbitmq_data:/var/lib/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: "guest"
RABBITMQ_DEFAULT_PASS: "guest"
networks:
- agenta-network
celery_worker:
build: ./agenta-backend
container_name: agenta-celery_worker-test
command: >
watchmedo auto-restart --directory=./agenta_backend --pattern=*.py --recursive -- celery -A agenta_backend.main.celery_app worker --concurrency=1 --loglevel=INFO
environment:
- MONGODB_URI=mongodb://username:password@mongo:27017
- REDIS_URL=redis://redis:6379/0
- ENVIRONMENT=${ENVIRONMENT}
- CELERY_BROKER_URL=amqp://guest@rabbitmq//
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- FEATURE_FLAG=oss
- DATABASE_MODE=test
volumes:
- ./agenta-backend/agenta_backend:/app/agenta_backend
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- rabbitmq
- redis
- mongo
extra_hosts:
- host.docker.internal:host-gateway
networks:
- agenta-network
networks:
agenta-network:
name: agenta-network
volumes:
mongodb_data:
redis_data: