This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
150 lines (150 loc) · 3.42 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
version: "3.9"
networks:
data-api:
driver: bridge
name: data-api
data-annotation-stack:
driver: bridge
name: data-annotation-stack
services:
rdb:
container_name: data-service-rdb
image: "postgres:15.1"
ports:
- 8032:$SQL_PORT
environment:
- POSTGRES_PASSWORD=$SQL_PASSWORD
- POSTGRES_USER=$SQL_USER
- POSTGRES_DB=$SQL_DB
volumes:
- tds_data:/var/lib/postgresql/data
networks:
- data-api
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${SQL_USER} -d ${SQL_DB}" ]
interval: 10s
timeout: 5s
retries: 5
api:
container_name: data-service-api
build:
context: ./
dockerfile: docker/Dockerfile
image: data-service
ports:
- "8001:8000"
env_file:
- api.env
environment:
- NEO4J_ENABLED
networks:
- data-annotation-stack
- data-api
depends_on:
migrations:
condition: service_completed_successfully
graphdb:
condition: service_started
minio:
condition: service_started
volumes:
- $PWD/tds:/api/tds
- $PWD/migrations:/api/migrations
graphdb:
build:
context: ./
dockerfile: docker/Dockerfile.neo4j
ports:
- 7474:7474
- 7687:7687
environment:
- NEO4J_AUTH=$NEO4J_AUTH
- NEO4J_dbms_memory_pagecache_size=512M
volumes:
- neo4j_data:/data
depends_on:
rdb:
condition: service_healthy
migrations:
condition: service_completed_successfully
networks:
- data-api
minio:
build:
context: ./
dockerfile: docker/Dockerfile.minio
environment:
MINIO_ROOT_USER: $MINIO_USER
MINIO_ROOT_PASSWORD: $MINIO_PWD
ports:
- 9000:9000
- 9001:9001
volumes:
- $PWD/data:/data
networks:
- data-api
- data-annotation-stack
elasticsearch:
image: elasticsearch:${STACK_VERSION}
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1g -Xmx1g
- xpack.security.enabled=false
- action.auto_create_index=false
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
ports:
- target: 9200
published: 9200
networks:
- data-api
healthcheck:
test: curl http://localhost:9200/_cluster/health?wait_for_status=yellow || exit 1
interval: 10s
timeout: 20s
retries: 5
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:${STACK_VERSION}
volumes:
- kibanadata:/usr/share/kibana/data
ports:
- ${KIBANA_PORT}:5601
environment:
- SERVERNAME=kibana
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}
mem_limit: ${MEM_LIMIT}
networks:
- data-api
- data-annotation-stack
migrations:
container_name: data-service-migrations
image: data-service
command: ['/api/migrations/run_migrations.sh']
env_file:
- api.env
environment:
- SEED_DATA=true
volumes:
- $PWD:/api
depends_on:
rdb:
condition: service_healthy
elasticsearch:
condition: service_healthy
minio:
condition: service_started
networks:
- data-api
volumes:
tds_data:
driver: local
neo4j_data:
driver: local
elasticsearch_data:
driver: local
kibanadata:
driver: local