-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
172 lines (158 loc) · 3.86 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
version: "3.9"
services:
iex:
image: ghcr.io/expediagroup/insights-explorer:latest
container_name: insights-explorer
environment:
# Used to encrypt data at rest in the database
# See /packages/backend/README.md for more information
ENCRYPTION_KEY: dnEkng5me8XzTejUayNFWeWATLtSrRq2vVm6hO3Uhtg=
# Automatically deploy example Insights
EXAMPLES_INIT_ON_STARTUP: true
# Elasticsearch
ELASTICSEARCH_NODE: http://elasticsearch:9200
ELASTICSEARCH_MAX_RETRIES: 5
# OAuth
OAUTH_PROVIDER: github
OAUTH_CLIENT_ID: __MUST_BE_PROVIDED__
OAUTH_CLIENT_SECRET: __MUST_BE_PROVIDED__
# Database
DB_HOST: db
DB_USERNAME: iex_rw
DB_PASSWORD: PG_CHANGE_ME
DB_DATABASE: iex
# Object Storage
S3_BUCKET: insights-explorer
S3_ENDPOINT: http://minio:9000
S3_FORCE_PATH_STYLE: true
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: minio123
# GitHub
GITHUB_SERVICE_ACCOUNT: __MUST_BE_PROVIDED__
GITHUB_ACCESS_TOKEN: __MUST_BE_PROVIDED__
GITHUB_DEFAULT_ORG: __MUST_BE_PROVIDED__
GITHUB_USE_WEBHOOK: false
ports:
- "3001:3001"
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:3001/api || exit 1"]
interval: 10s
timeout: 10s
retries: 3
depends_on:
- elasticsearch
- db
- minio
- minio_init
networks:
- iex
profiles:
- all
- iex
db:
image: postgres:14.2
container_name: iex-db
restart: always
environment:
POSTGRES_USER: iex_rw
POSTGRES_PASSWORD: PG_CHANGE_ME
POSTGRES_DB: iex
ports:
- "5432:5432"
volumes:
- iex_db_data:/var/lib/postgresql/data
- ./scripts/docker-compose/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
networks:
- iex
profiles:
- all
- infra
- db
minio:
image: minio/minio:RELEASE.2022-02-12T00-51-25Z
container_name: iex_minio
command: server /data --console-address ":9001"
environment:
- "MINIO_ROOT_USER=minio"
- "MINIO_ROOT_PASSWORD=minio123"
ports:
- "9000:9000"
- "9001:9001"
volumes:
- iex_minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
- iex
profiles:
- all
- infra
- minio
minio_init:
image: minio/mc
container_name: iex-minio-init
depends_on:
- minio
entrypoint: >
/bin/sh -c "
echo Waiting for minio service to start...;
sleep 15;
/usr/bin/mc alias set iexminio http://minio:9000 minio minio123;
/usr/bin/mc mb iexminio/insights-explorer;
/usr/bin/mc policy set public iexminio/insights-explorer;
exit 0;
"
networks:
- iex
profiles:
- all
- infra
- minio
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.3
container_name: iex-es
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 10s
retries: 3
volumes:
- iex_es_data:/usr/share/elasticsearch/data
networks:
- iex
profiles:
- all
- infra
- es
kibana:
image: docker.elastic.co/kibana/kibana:7.16.3
container_name: iex-kibana
ports:
- "5601:5601"
depends_on:
- elasticsearch
volumes:
- iex_kibana_data:/usr/share/kibana/data
networks:
- iex
profiles:
- all
- extras
- kibana
networks:
iex:
driver: bridge
volumes:
iex_db_data:
iex_es_data:
iex_kibana_data:
iex_minio_data: