forked from DFE-Digital/teaching-vacancies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
59 lines (55 loc) · 1.46 KB
/
docker-compose.test.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
version: '3.1'
services:
test: &test
build:
context: .
args:
RAILS_ENV: "test"
environment:
RAILS_ENV: "test"
DATABASE_URL: "postgres://postgres@db-test:5432/tvs_test?template=template0&pool=5&encoding=unicode"
ELASTICSEARCH_URL: "http://elasticsearch-test:9200"
env_file:
- docker-compose.env
volumes:
- .:/srv/dfe-tvs:cached
- node_modules:/srv/dfe-tvs/node_modules:cached
depends_on:
- db-test
- elasticsearch-test
command: ["bundle", "exec", "./bin/dsetup && spring server"]
restart: on-failure
networks:
- tests
db-test:
image: postgres
volumes:
- pg_test_data:/var/lib/postgresql/data/:cached
networks:
- tests
restart: on-failure
elasticsearch-test:
image: docker.elastic.co/elasticsearch/elasticsearch:6.0.1
hostname: "{{.Node.Hostname}}-elasticsearch-test"
depends_on:
- db-test
ports:
- "9201:9200"
environment:
- discovery.type=single-node
- cluster.name=docker-test-cluster
- node.name={{.Node.Hostname}}-elasticsearch-test
- network.host=0.0.0.0
# place elasticsearch data on tmpfs for performance
tmpfs: /usr/share/elasticsearch/test/data
volumes:
- elasticsearch_test:/usr/share/elasticsearch/teaching_jobs_test/data
networks:
- tests
restart: on-failure
networks:
tests:
volumes:
pg_test_data: {}
elasticsearch_test: {}
node_modules: