generated from LBHackney-IT/lbh-base-api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
106 lines (104 loc) · 2.52 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
version: "3.2"
services:
addresses-api:
image: addresses-api
build:
context: AddressesAPI/
dockerfile: ./Dockerfile
ports:
- 3000:3000
environment:
- CONNECTION_STRING=Host=dev-database;Port=5432;Database=devdb;Username=postgres;Password=mypassword
- ELASTICSEARCH_DOMAIN_URL=http://localhost:9200
links:
- dev-database
- dev-elasticsearch
dev-elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3
container_name: dev-elasticsearch
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ports:
- 9200:9200
volumes:
- esdata-dev:/usr/share/elasticsearch/data
dev-database:
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=mypassword
- POSTGRES_DB=devdb
image: postgres:16
container_name: dev-database
ports:
- 5433:5432
volumes:
- ./data/postgres/seed-dev-data.sql:/var/seed-dev-data.sql
addresses-api-test:
image: addresses-api-test
build:
context: .
dockerfile: AddressesAPI.Tests/Dockerfile
environment:
- DB_HOST=test-database
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=mypassword
- DB_DATABASE=testdb
- ELASTICSEARCH_DOMAIN_URL= http://test-elasticsearch:9200
links:
- test-database
- test-elasticsearch
networks:
- elastic
- postgres
test-database:
image: postgres:16
container_name: test-database
ports:
- 5432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=mypassword
- POSTGRES_DB=testdb
networks:
- postgres
test-elasticsearch:
image: test-elasticsearch
container_name: test-elasticsearch
build:
context: .
dockerfile: data/elasticsearch/Dockerfile
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- 9202:9200
volumes:
- esdata-test:/usr/share/elasticsearch/data
networks:
elastic:
aliases:
- test-elasticsearch
- elastic
kibana:
image: docker.elastic.co/kibana/kibana:7.9.3
container_name: kibana
ports:
- 5601:5601
environment:
ELASTICSEARCH_HOSTS: http://test-elasticsearch:9200
networks:
- elastic
volumes:
esdata-test:
driver: local
esdata-dev:
driver: local
networks:
elastic:
driver: bridge
postgres:
driver: bridge