-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
108 lines (104 loc) · 3.98 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
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
services:
ylem_database:
env_file:
- .env
- .env.common
build:
context: .
dockerfile: Dockerfile-db
networks:
- ylem_network
command: --init-file=/docker-entrypoint-initdb.d/init.sql
environment:
- MYSQL_DATABASE=${YLEM_DATABASE_NAME}
- MYSQL_USER=${YLEM_DATABASE_USER}
- MYSQL_PASSWORD=${YLEM_DATABASE_PASSWORD}
- MYSQL_ROOT_PASSWORD=${YLEM_DATABASE_ROOT_PASSWORD}
ports:
- "3306:3306"
volumes:
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./database/data:/var/lib/mysql
container_name: ylem_database
healthcheck:
interval: 10s
retries: 50
test:
[
"CMD",
"healthcheck.sh",
"--su-mysql",
"--connect",
"--innodb_initialized"
]
timeout: 15s
ylem_session_storage:
env_file:
- .env
- .env.common
image: "redis:alpine"
command: redis-server --requirepass ${YLEM_REDIS_PASSWORD}
ports:
- "6379:6379"
networks:
- ylem_network
environment:
- REDIS_REPLICATION_MODE=master
volumes:
- ./database/redis/redis.conf:/usr/local/etc/redis/redis.conf
container_name: ylem_session_storage
links:
- ylem_database
depends_on:
ylem_database:
condition: service_healthy
# Comment this one out if you use your own Apache Kafka cluster
ylem_kafka_topic_creator:
condition: service_completed_successfully
# Comment this one out if you use your own Apache Kafka cluster
ylem_kafka_broker:
image: confluentinc/confluent-local:7.7.1
container_name: ylem_kafka_broker
networks:
- ylem_network
environment:
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:9092,PLAINTEXT_YLEM://ylem_kafka_broker:39092"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,PLAINTEXT_YLEM:PLAINTEXT"
KAFKA_LISTENERS: "PLAINTEXT://localhost:29092,CONTROLLER://localhost:29093,PLAINTEXT_HOST://0.0.0.0:9092,PLAINTEXT_YLEM://ylem_kafka_broker:39092"
ports:
- "39092:39092"
volumes:
- ./database/kafka_data:/var/lib/kafka/data
healthcheck:
test: /bin/kafka-topics --list --bootstrap-server localhost:9092 || exit 1
interval: 1s
timeout: 60s
retries: 60
ylem_kafka_topic_creator:
image: confluentinc/confluent-local:7.7.1
container_name: ylem_kafka_topic_creator
networks:
- ylem_network
depends_on:
ylem_kafka_broker:
condition: service_healthy
command: "bash -c 'kafka-topics --create --if-not-exists --bootstrap-server ylem_kafka_broker:39092 --partitions 1 --replication-factor 1 --topic task_runs && \
kafka-topics --create --if-not-exists --bootstrap-server ylem_kafka_broker:39092 --partitions 1 --replication-factor 1 --topic task_runs_load_balanced && \
kafka-topics --create --if-not-exists --bootstrap-server ylem_kafka_broker:39092 --partitions 1 --replication-factor 1 --topic task_run_results && \
kafka-topics --create --if-not-exists --bootstrap-server ylem_kafka_broker:39092 --partitions 1 --replication-factor 1 --topic query_task_run_results && \
kafka-topics --create --if-not-exists --bootstrap-server ylem_kafka_broker:39092 --partitions 1 --replication-factor 1 --topic notification_task_run_results'"
networks:
ylem_network:
name: ylem_network
external: false
include:
- api/docker-compose.yml
- backend/users/docker-compose.yml
- backend/statistics/docker-compose.yml
- backend/integrations/docker-compose.yml
- backend/pipelines/docker-compose.yml
- processor/taskrunner/docker-compose.yml
- processor/python_processor/docker-compose.yml
- ui/docker-compose-dev.yml # use this one for the development environment UI
#- ui/docker-compose.yml # use this one for the production environment UI
- server/docker-compose.yml