-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
64 lines (61 loc) · 1.57 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
services:
teamj_backend:
build:
context: .
dockerfile: Dockerfile
ports:
- '8000:8000'
depends_on:
- teamj_db
- rabbitmq
- celery_worker
volumes:
- './app:/app'
environment:
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- DATABASE_URL=${DATABASE_URL}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENSEARCH_URL=${OPENSEARCH_URL}
- OPENSEARCH_ADMIN=${OPENSEARCH_ADMIN}
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- GPT_MODEL=${GPT_MODEL}
- ADMIN_USERNAME=${ADMIN_USERNAME}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- LOG_LEVEL=${LOG_LEVEL}
entrypoint:
- sh
- '-c'
- 'sleep 10 && uvicorn main:app --host 0.0.0.0 --port 8000 --reload'
teamj_db:
image: 'mysql:latest'
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
LANG: C.UTF-8
expose:
- '3306:3306'
volumes:
- './db_data:/var/lib/mysql'
rabbitmq:
image: rabbitmq:3
expose:
- "5672:5672"
- "15672:15672"
- "15692:15692" #metrics 포트
command: >
sh -c "rabbitmq-plugins enable --offline rabbitmq_management rabbitmq_prometheus &&
rabbitmq-server"
celery_worker:
build:
context: .
dockerfile: Dockerfile.worker
command: celery -A utils.celery_worker worker --loglevel=info
working_dir: /app
expose:
- '5555:5555'
volumes:
- ./app/utils:/app/utils
environment:
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
depends_on:
- rabbitmq