-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose-test.yml
87 lines (81 loc) · 2.1 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3.4'
services:
elastic:
# in order to get elastic to work, see https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-prod-mode
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.2
environment:
- cluster.routing.allocation.disk.threshold_enabled=false
- 'ES_JAVA_OPTS=-Xms1024m -Xmx1024m'
- ELASTIC_PASSWORD=elastic
- 'discovery.type=single-node'
- TAKE_FILE_OWNERSHIP=true
- xpack.security.enabled=false
# - xpack.graph.enabled=false
# - xpack.ml.enabled=false
# - xpack.monitoring.enabled=false
# - xpack.security.enabled=false
# - xpack.watcher.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:7.16.2
ports:
- 5601:5601
depends_on:
- elastic
redis:
image: redis:6.2-alpine
ports:
- 6379:6379
postgres:
image: postgres:14.11
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- 5432:5432
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
command: ['postgres', '-c', 'log_statement=all']
republik-api-setup:
image: api-republik-test:latest
env_file:
- apps/api/.env.test.local
environment:
- DATABASE_URL=postgres://postgres@postgres:5432/republik-test
entrypoint:
[
'launcher',
'yarn migrate:db:create && yarn migrate:up && yarn migrate:db:import',
]
depends_on:
- elastic
- redis
- postgres
republik-api:
image: api-republik-test:latest
env_file:
- apps/api/.env.test.local
environment:
- DATABASE_URL=postgres://postgres@postgres:5432/republik-test
- ELASTIC_URL=http://elastic:9200
- REDIS_URL=redis://redis:6379
depends_on:
- elastic
- redis
- postgres
- republik-api-setup
ports:
- 5010:5010
mailhog:
image: mailhog/mailhog:v1.0.1
ports:
- 1025:1025
- 8025:8025