-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdocker-compose.test.yml
69 lines (63 loc) · 1.57 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
60
61
62
63
64
65
66
67
68
69
version: "2"
services:
redis:
container_name: redis
image: redis:6.0.3
ports:
- 6379:6379
volumes:
- redis_data_test:/data
memcached:
container_name: memcached
image: memcached:1.6.6
ports:
- 11211:11211
pg:
container_name: pg
image: postgis/postgis:12-3.0
environment:
POSTGRES_USER: 'inaturalist'
POSTGRES_PASSWORD: 'inaturalist'
POSTGRES_DB: inaturalist_test
ports:
- 5432:5432
volumes:
- pg_data_test:/var/lib/postgresql/data
- ./schema/database.sql:/docker-entrypoint-initdb.d/database.sql
es:
container_name: es
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.3
environment:
- discovery.type=single-node
- xpack.security.enabled=false
ports:
- 9200:9200
volumes:
- es_data_test:/usr/share/elasticsearch/data
command: >
/bin/sh -c "bin/elasticsearch-plugin list | grep -q analysis-kuromoji
|| bin/elasticsearch-plugin install analysis-kuromoji;
/usr/local/bin/docker-entrypoint.sh"
api-test:
container_name: api-test
build:
context: .
dockerfile: Dockerfile
target: test
environment:
NODE_ENV: test
NODE_DEBUG: true
INAT_DB_HOST: pg
INAT_DB_USER : 'inaturalist'
INAT_DB_PASS: 'inaturalist'
INAT_ES_HOST: es
INAT_REDIS_HOST: redis
INAT_RAILS_URL: http://localhost:3000
INAT_DB_NAME: inaturalist_test
INAT_ES_INDEX_PREFIX: test
ports:
- 4000:4000
volumes:
redis_data_test:
pg_data_test:
es_data_test: