-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yaml
91 lines (85 loc) · 2.37 KB
/
docker-compose.yaml
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
version: '3'
services:
export:
container_name: export-server
image: export
build:
context: .
environment:
- PGSQL_PORT=5432
- PGSQL_HOSTNAME=export-db
- DEBUG=true
- OPEN_API_FILE_PATH=/var/tmp/openapi.json
- OPEN_API_PRIVATE_PATH=/var/tmp/private.json
- PSKS=testing-a-psk
- KAFKA_BROKERS=kafka:29092
- AWS_ACCESS_KEY=minio
- AWS_SECRET_ACCESS_KEY=minioadmin
- PUBLIC_PORT=8000
- METRICS_PORT=9090
- MINIO_PORT=9099
- PRIVATE_PORT=10010
ports:
- 8000:8000
- 9090:9090
- 9099:9099
- 10010:10010
db:
container_name: export-db
image: postgres:14
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
privileged: true
ports:
- 5432:5432
volumes:
- ./tmp/db:/var/lib/postgresql/data
command:
- postgres
- -c
- log_statement=all
s3:
image: minio/minio
ports:
- 9099:9099
- 9990:9990
volumes:
- ./tmp/minio:/data:Z
environment:
- MINIO_ROOT_USER=${AWS_ACCESS_KEY-minio}
- MINIO_ROOT_PASSWORD=${AWS_SECRET_ACCESS_KEY-minioadmin}
command: server --address 0.0.0.0:9099 --console-address 0.0.0.0:9990 /data
s3-createbucket:
image: minio/mc
depends_on:
- s3
restart: on-failure
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://s3:9099 ${AWS_ACCESS_KEY-minio} ${AWS_SECRET_ACCESS_KEY-minioadmin} || exit 1;
/usr/bin/mc mb --ignore-existing myminio/exports-bucket;
/usr/bin/mc policy set public myminio/exports-bucket;
"
zookeeper:
container_name: zookeeper
image: confluentinc/cp-zookeeper
environment:
- ZOOKEEPER_CLIENT_PORT=32181
- ZOOKEEPER_SERVER_ID=1
kafka:
container_name: kafka
image: confluentinc/cp-kafka
ports:
- 9092:9092
- 29092:29092
depends_on:
- zookeeper
environment:
- KAFKA_ADVERTISED_LISTENERS=DOCKER://${KAFKA_QUEUE_HOST-kafka}:${KAFKA_QUEUE_PORT-29092},LOCALHOST://localhost:${KAFKA_QUEUE_PORT-9092}
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=DOCKER:PLAINTEXT,LOCALHOST:PLAINTEXT
- KAFKA_INTER_BROKER_LISTENER_NAME=DOCKER
- KAFKA_BROKER_ID=1
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:32181
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true