-
Notifications
You must be signed in to change notification settings - Fork 81
/
dev.yml
134 lines (128 loc) · 4.14 KB
/
dev.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
version: '3.1'
services:
db:
container_name: hbi-db
image: docker.io/library/postgres
restart: always
environment:
POSTGRES_PASSWORD: insights
POSTGRES_USER: insights
PGUSER: insights
POSTGRES_DB: insights
privileged: true
ports:
- "5432:5432"
volumes:
- ./.unleash/create_unleashdb.sql:/docker-entrypoint-initdb.d/create_unleashdb.sql
- ./.export-service/create_exportdb.sql:/docker-entrypoint-initdb.d/create_exportdb.sql
healthcheck:
test: "pg_isready -h db"
interval: 2s
timeout: 5s
retries: 5
export-service:
container_name: export-service
image: quay.io/cloudservices/export-service
environment:
- PGSQL_PORT=5432
- PGSQL_HOSTNAME=db
- PGSQL_USER=insights
- PGSQL_PASSWORD=insights
- PGSQL_DATABASE=export_service
- DEBUG=true
- OPEN_API_FILE_PATH=/var/tmp/openapi.json
- OPEN_API_PRIVATE_PATH=/var/tmp/private.json
- KAFKA_BROKERS=kafka:29092
- PSKS=testing-a-psk
- AWS_ACCESS_KEY=minio
- AWS_SECRET_ACCESS_KEY=minioadmin
- FAFKA_ANNOUNCE_TOPIC=platform.export.requests
- PUBLIC_PORT=8001
- METRICS_PORT=9090
- MINIO_PORT=9099
- MINIO_HOST=minio
- PRIVATE_PORT=10010
depends_on:
db:
condition: service_healthy
volumes:
- './.export-service:/.export-service'
ports:
- 8001:8001
- 9090:9090
- 10010:10010
command: >
/bin/sh -c "export-service migrate_db upgrade;
export-service api_server;
"
zookeeper:
container_name: zookeeper
image: docker.io/confluentinc/cp-zookeeper
environment:
- ZOOKEEPER_CLIENT_PORT=32181
- ZOOKEEPER_SERVER_ID=1
kafka:
container_name: kafka
image: docker.io/confluentinc/cp-kafka
ports:
- 29092:29092
- 9092:9092
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
unleash:
container_name: unleash
image: quay.io/cloudservices/unleash-server:4.21.0
environment:
- INIT_ADMIN_API_TOKENS=${UNLEASH_TOKEN:?}
- CHECK_VERSION=false
- DATABASE_HOST=db
- DATABASE_NAME=unleash
- DATABASE_USERNAME=${DATABASE_USER-insights}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-insights}
- DATABASE_SSL=false
- IMPORT_DROP_BEFORE_IMPORT=false
- IMPORT_FILE=/.unleash/flags.json
- IMPORT_DROP_BEFORE_IMPORT=true
- LOG_LEVEL=INFO
ports:
- 4242:4242
volumes:
- './.unleash:/.unleash'
depends_on:
db:
condition: service_healthy
minio:
container_name: minio
image: docker.io/minio/minio
ports:
- 9099:9099
- 9991:9991
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:9991 /data
s3-createbucket:
container_name: s3-createbucket
image: docker.io/minio/mc
depends_on:
- minio
restart: on-failure
entrypoint: >
/bin/sh -c "
sleep 10;
/usr/bin/mc config host add myminio http://minio:9099 ${AWS_ACCESS_KEY-minio} ${AWS_SECRET_ACCESS_KEY-minioadmin};
/usr/bin/mc alias set minio http://minio:9099 ${AWS_ACCESS_KEY-minio} ${AWS_SECRET_ACCESS_KEY-minioadmin};
/usr/bin/mc mb --ignore-existing myminio/exports-bucket;
/usr/bin/mc policy set public myminio/exports-bucket;
exit 0;
"