-
Notifications
You must be signed in to change notification settings - Fork 235
/
docker-compose.yml
157 lines (144 loc) · 4.26 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
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
152
153
154
155
156
157
version: "3.7"
services:
postgres:
container_name: postgres
image: postgres:9.6
environment:
- POSTGRES_USER=${AIRFLOW}
- POSTGRES_PASSWORD=${AIRFLOW}
- POSTGRES_DB=${AIRFLOW}
logging:
options:
max-size: 10m
max-file: "3"
airflow:
container_name: airflow
build: ./airflow
restart: unless-stopped
logging:
options:
max-size: 10m
max-file: "3"
command: ["webserver"]
ports:
- 8080:8080
volumes:
- ./airflow/dags:/usr/local/airflow/dags
- ./airflow/modules:/usr/local/airflow/modules
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
depends_on:
- postgres
zookeeper:
container_name: zookeeper
image: confluentinc/cp-zookeeper:5.3.5
environment:
- ZOOKEEPER_CLIENT_PORT=${ZOOKEEPER_CLIENT_PORT}
ports:
- 2181:2181
kafka:
container_name: kafka
build: ./kafka
environment:
- DEFAULT_TOPIC=${DEFAULT_TOPIC}
- KAFKA_ZOOKEEPER_CONNECT=${ZOOKEEPER_URL}
- KAFKA_ADVERTISED_LISTENERS=${KAFKA_LISTENERS}
depends_on:
- zookeeper
schema-registry:
container_name: schema-registry
image: confluentinc/cp-schema-registry:5.3.5
environment:
- SCHEMA_REGISTRY_HOST_NAME=${SCHEMA_REGISTRY_HOST_NAME}
- SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL=${ZOOKEEPER_URL}
- SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL=${SCHEMA_REGISTRY_LOGLEVEL}
depends_on:
- kafka
redis:
container_name: redis
image: redis:alpine
command: ["redis-server"]
ports:
- 6379:6379
volumes:
- ./redis:/usr/local/etc/redis
connect:
container_name: connect
build: ./connect
environment:
- CONNECT_REST_ADVERTISED_HOST_NAME=${CONNECT_REST_ADVERTISED_HOST_NAME}
- CONNECT_SCHEMA_REGISTRY_URL=${SCHEMA_REGISTRY_URL}
- CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL=${SCHEMA_REGISTRY_URL}
- CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL=${SCHEMA_REGISTRY_URL}
- CONNECT_BOOTSTRAP_SERVERS=${CONNECT_BOOTSTRAP_SERVERS}
ports:
- 8083:8083
depends_on:
- kafka
- schema-registry
- api
- minio
elasticsearch:
container_name: elasticsearch
build: ./elastic
restart: unless-stopped
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
mongo:
container_name: mongo
image: mongo:4.2
command: ["mongod", "--replSet", "rs0", "--auth"]
environment:
- MONGO_ADMIN=${MONGO_ADMIN}
- RSS_NEWS_USER=${RSS_NEWS}
ports:
- 27017:27017
volumes:
- ./mongo/init.sh:/usr/local/bin/init.sh
api:
container_name: api
build: ./api
restart: unless-stopped
environment:
- ELASTIC_HOST=${ELASTIC_HOST}
- ELASTIC_INDEX=${ELASTIC_INDEX}
- MONGO_HOST=${MONGO_HOST}
- MONGO_USR=${RSS_NEWS}
- MONGO_PASSWD=${RSS_NEWS}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
volumes:
- ./api/app:/app
- static_data:/app/static
depends_on:
- mongo
- elasticsearch
proxy:
container_name: proxy
build: ./api/proxy
ports:
- 5000:5000
volumes:
- static_data:/vol/static
depends_on:
- api
minio:
container_name: minio
build: ./minio
ports:
- 9000:9000
environment:
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
- DEFAULT_BUCKET=${MINIO_DEFAULT_BUCKET}
networks:
default:
name: backend-net
volumes:
static_data: {}