-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
141 lines (135 loc) · 3.42 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
version: "2.4"
services:
database:
image: quay.io/azavea/postgis:2.3-postgres9.6-slim
volumes:
- ./data/:/tmp/data/
ports:
- 5432:5432
environment:
- POSTGRES_USER=granary
- POSTGRES_PASSWORD=granary
- POSTGRES_DB=granary
healthcheck:
test: ["CMD", "pg_isready", "-U", "granary"]
interval: 3s
timeout: 3s
retries: 3
start_period: 5s
api:
image: openjdk:11-jdk
command:
- "api/run"
depends_on:
database:
condition: service_healthy
entrypoint: java
command:
- "-jar"
- "granary-api-assembly.jar"
environment:
- AWS_PROFILE
- AWS_REGION
- ENVIRONMENT=development
- GRANARY_API_HOST=http://granary.service.internal/api
- GRANARY_LOG_LEVEL=DEBUG
- POSTGRES_URL=jdbc:postgresql://database.service.internal/
- POSTGRES_NAME=granary
- POSTGRES_USER=granary
- POSTGRES_PASSWORD=granary
- GRANARY_TRACING_SINK=jaeger
- AUTH_ENABLED=false
links:
- database:database.service.internal
- jaeger:jaeger.service.internal
- xray:xray.service.internal
ports:
- "8080:8080"
volumes:
- ./:/opt/granary/
- $HOME/.sbt:/root/.sbt
- $HOME/.coursier:/root/.coursier
- ./.bintray:/root/.bintray
- $HOME/.ivy2:/root/.ivy2
- $HOME/.aws:/root/.aws:ro
working_dir: /opt/granary/api/target/scala-2.12/
calculate-water:
build:
context: example-tasks
dockerfile: Dockerfile.calculate-water
environment:
- AWS_PROFILE
volumes:
- ./example-tasks/:/opt/granary/
- ./data/:/opt/data/
- $HOME/.aws:/root/.aws:ro
working_dir: /opt/granary/
links:
- api:granary.service.internal
sbt:
image: openjdk:11-jdk
depends_on:
database:
condition: service_healthy
links:
- database:database.service.internal
environment:
- AWS_PROFILE
- AWS_REGION
- POSTGRES_URL=jdbc:postgresql://database.service.internal/
- POSTGRES_NAME=granary
- POSTGRES_USER=granary
- POSTGRES_PASSWORD=granary
- COURSIER_CACHE=$HOME/.coursier
volumes:
- ./:/opt/granary
- $HOME/.sbt:/root/.sbt
- $HOME/.coursier:/root/.coursier
- ./.bintray:/root/.bintray
- $HOME/.ivy2:/root/.ivy2
- $HOME/.aws:/root/.aws:ro
working_dir: /opt/granary/
entrypoint: ./sbt
api-migrations:
image: boxfuse/flyway:5.2.4
environment:
- FLYWAY_DRIVER=org.postgresql.Driver
- FLYWAY_URL=jdbc:postgresql://database.service.internal/granary
- FLYWAY_USER=granary
- FLYWAY_PASSWORD=granary
- FLYWAY_LOCATIONS=filesystem:/opt/granary/database/src/main/resources/migrations
- FLYWAY_SCHEMAS=public
- FLYWAY_BASELINE_ON_MIGRATE=true
depends_on:
database:
condition: service_healthy
links:
- database:database.service.internal
volumes:
- ./:/opt/granary
jaeger:
image: jaegertracing/all-in-one:1.8
expose:
- 5775/udp
- 6831/udp
- 6832/udp
- 5778
- 16686
- 14268
- 9411
ports:
- 16686:16686
environment:
- COLLECTOR_ZIPKIN_HTTP_PORT=9411
xray:
image: amazon/aws-xray-daemon
volumes:
- $HOME/.aws:/root/.aws:ro
ports:
- 2000
entrypoint: "/usr/bin/xray"
command:
- "-t"
- "0.0.0.0:2000"
- "-b"
- "0.0.0.0:2000"