-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (76 loc) · 1.86 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
version: '3'
services:
vault:
image: vault:1.13.3
restart: always
volumes:
- ./vault/vault.json:/vault/config/vault.json
- vault-data:/vault/file
environment:
- VAULT_ADDR=http://0.0.0.0:8200
- VAULT_API_ADDR=http://0.0.0.0:8200
- VAULT_ADDRESS=http://0.0.0.0:8200
cap_add:
- IPC_LOCK
command: vault server -config=/vault/config/vault.json
ports:
- 8200:8200
healthcheck:
test:
[
"CMD-SHELL",
"wget --spider http://127.0.0.1:8200/v1/sys/health || exit 1"
]
interval: 10s
timeout: 5s
retries: 3
db:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
identity-service:
image: identity
build:
context: .
dockerfile: Dockerfile
depends_on:
db:
condition: service_healthy
vault:
condition: service_healthy
ports:
- 3332:3332
environment:
DATABASE_URL: "postgres://postgres:postgres@db:5432/postgres"
VAULT_ADDR: "http://vault:8200"
# This will be replaced automatically on initialisation
# make compose-init will call setup_vault.sh
VAULT_TOKEN: hvs.ZBCv64FQYZibBmfa6cgcc8ls
VAULT_BASE_URL: "http://vault:8200/v1"
VAULT_ROOT_PATH: "http://vault:8200/v1/kv"
VAULT_TIMEOUT: 5000
VAULT_PROXY: 'false'
SIGNING_ALGORITHM: "RS256"
JWKS_URI:
ENABLE_AUTH: "false"
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://localhost:3332/health || exit 1"
]
interval: 10s
timeout: 5s
retries: 5
volumes:
data:
vault-data: