This repository was archived by the owner on Jun 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose-vault.yml
More file actions
52 lines (51 loc) · 1.6 KB
/
Copy pathdocker-compose-vault.yml
File metadata and controls
52 lines (51 loc) · 1.6 KB
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
version: '3'
services:
config:
environment:
VAULT_ENABLED: 1
VAULT_DO_AUTOCONFIGURE: 1
volumes:
- vault-server-config:/vault/server
- vault-client-config:/vault/concourse
vault:
restart: unless-stopped # required so that it retries until concourse-db comes up
# see https://hub.docker.com/_/vault
image: vault:1.8.2
cap_add:
- IPC_LOCK
depends_on:
- config
# there should be no need to open this port to the outer world since we configure using config
# still, of course this can be enabled if needed
#ports:
# - 8200:8200
volumes:
- vault-server-config:/vault/config
- vault-server-data:/vault/file
command: vault server -config /vault/config/vault.hcl
web:
# ensure we know where the self signed cert is
depends_on:
- vault
- config
environment:
CONCOURSE_VAULT_URL: https://vault:8200
CONCOURSE_VAULT_CA_CERT: /vault/client/server.crt
CONCOURSE_VAULT_TLS_INSECURE_SKIP_VERIFY: 'true'
CONCOURSE_VAULT_PATH_PREFIX: /secret/concourse
# those keys are generated by the config container
CONCOURSE_VAULT_AUTH_BACKEND: cert
CONCOURSE_VAULT_CLIENT_CERT: /vault/client/cert.pem
CONCOURSE_VAULT_CLIENT_KEY: /vault/client/key.pem
CONCOURSE_SECRET_CACHE_ENABLED: 'true'
CONCOURSE_SECRET_CACHE_DURATION: 30m
volumes:
# needed to share the self signed cert and the auth cert
- vault-client-config:/vault/client
volumes:
vault-server-data:
driver: local
vault-server-config:
driver: local
vault-client-config:
driver: local