-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
79 lines (78 loc) · 1.67 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
version: '3'
services:
cosmos:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- ./src:/app/src
ports:
- '8000:8000'
depends_on:
- mongodb
environment:
MONGODB_HOST: mongodb://mongodb/cosmos
CUBE_URL: http://cube:4000
healthcheck:
test:
[
'CMD',
'sh',
'-c',
'curl -f http://localhost:8000/ping'
]
interval: 20s
timeout: 5s
retries: 12
mongodb:
image: mongo:latest
ports:
- 27017:27017
volumes:
- ./.temp/database:/data/db
healthcheck:
test: [ 'CMD', 'sh', '-c', 'curl -f http://localhost:27017' ]
interval: 10s
timeout: 5s
retries: 12
cube:
build:
context: ./cube-server
dockerfile: Dockerfile
ports:
- '4000:4000'
depends_on:
- redis
- aggregate_db
environment:
ENIGMA_URL: http://cosmos:8000
CUBEJS_REDIS_URL: redis://redis:6379
CUBEJS_DEV_MODE: 'true'
CUBEJS_EXT_DB_HOST: aggregate_db
CUBEJS_EXT_DB_NAME: cube-aggregate
CUBEJS_EXT_DB_USER: postgres
CUBEJS_EXT_DB_PASS: postgres
CUBEJS_EXT_DB_TYPE: postgres
healthcheck:
test:
[
'CMD',
'sh',
'-c',
'curl -f http://localhost:4000/livez'
]
interval: 10s
timeout: 5s
retries: 12
redis:
image: 'redis:alpine'
aggregate_db:
image: postgres:12
environment:
- POSTGRES_DB=cube-aggregate
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- 5431:5432
volumes:
- ./.temp/aggregate_db:/var/lib/postgresql/data