-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdocker-compose.yml
122 lines (117 loc) · 3.13 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
volumes:
apptmpdir:
hsmtmpdir:
services:
db:
container_name: autograph-db
image: autograph:db
build:
context: database/
environment:
- POSTGRES_DB=autograph
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5432:5432"
command: postgres -c 'ssl=on' -c 'ssl_cert_file=/opt/server.crt' -c 'ssl_key_file=/opt/server.key'
volumes:
- ./database/unittest-setup.sql:/docker-entrypoint-initdb.d/unittest-setup.sql
app:
container_name: autograph-app
image: autograph-app
build:
context: .
environment:
- AUTOGRAPH_DB_DSN=host=db user=myautographdbuser dbname=autograph password=myautographdbpassword sslmode=verify-full sslrootcert=/opt/db-root.crt
links:
- db
ports:
- "8000:8000"
volumes:
- apptmpdir:/tmp/
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/__heartbeat__"]
interval: 60s
timeout: 10s
retries: 3
app-hsm:
container_name: autograph-app-hsm
image: autograph-app-hsm
build:
context: tools/softhsm/
environment:
- AUTOGRAPH_DB_DSN=host=db user=myautographdbuser dbname=autograph password=myautographdbpassword sslmode=verify-full sslrootcert=/opt/db-root.crt
links:
- db
ports:
- "8001:8001"
volumes:
- hsmtmpdir:/tmp/
depends_on:
- db
command:
[
"/app/src/autograph/bin/wait-for-it.sh",
"db:5432",
"--",
"autograph",
"-c",
"/app/autograph.softhsm.yaml",
]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/__heartbeat__"]
interval: 60s
timeout: 10s
retries: 3
monitor:
container_name: autograph-monitor
image: autograph-monitor
build:
context: tools/autograph-monitor/
dockerfile: Dockerfile.monitor-selftest
environment:
- AUTOGRAPH_URL=http://autograph-app:8000/
- AUTOGRAPH_KEY=19zd4w3xirb5syjgdx8atq6g91m03bdsmzjifs2oddivswlu9qs
links:
- app
depends_on:
- app
monitor-hsm:
container_name: autograph-monitor-hsm
image: autograph-monitor
build:
context: tools/autograph-monitor/
dockerfile: Dockerfile.monitor-selftest
environment:
- AUTOGRAPH_URL=http://autograph-app-hsm:8001/
- AUTOGRAPH_KEY=19zd4w3xirb5syjgdx8atq6g91m03bdsmzjifs2oddivswlu9qs
ports:
- "9001:8080"
links:
- app-hsm
depends_on:
- app-hsm
unit-test:
container_name: autograph-unit-test
image: autograph-app
build:
context: .
environment:
- AUTOGRAPH_DB_DSN=host=db user=myautographdbuser dbname=autograph password=myautographdbpassword sslmode=verify-full sslrootcert=/app/src/autograph/tools/softhsm/db-root.crt
- AUTOGRAPH_DB_HOST=db
# env var to tell script to report coverage
- CI
# env vars to help goveralls report coverage
- COVERALLS_TOKEN
- CI_BRANCH
- CI_PULL_REQUEST
- CIRCLE_BRANCH
- CIRCLE_BUILD_NUM
- CIRCLE_PR_NUMBER
links:
- db
user: "0"
working_dir: "/app/src/autograph/"
command:
[
"./bin/run_unit_tests.sh"
]