forked from puppetlabs/pupperware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (82 loc) · 2.69 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
version: '3.7'
services:
puppet:
hostname: puppet.${DOMAIN:-test}
image: puppet/puppetserver:${PUPPETSERVER_VERSION:-latest}
ports:
- 8140:8140
environment:
# necessary to set certname and server in puppet.conf, required by
# puppetserver ca cli application
- PUPPETSERVER_HOSTNAME=puppet.${DOMAIN:-test}
# DNS_ALT_NAMES must be set before starting the stack the first time,
# and must list all the names under which the puppetserver can be
# reached. 'puppet.${DOMAIN:-test}' must be one of them, otherwise puppetdb won't be
# able to get a cert. Add other names as a comma-separated list
- CA_ALLOW_SUBJECT_ALT_NAMES=true
- DNS_ALT_NAMES=puppet,puppet.${DOMAIN:-test},${DNS_ALT_NAMES:-}
- PUPPERWARE_ANALYTICS_ENABLED=${PUPPERWARE_ANALYTICS_ENABLED:-true}
- PUPPETDB_SERVER_URLS=https://puppetdb.${DOMAIN:-test}:8081
volumes:
- puppetserver-code:/etc/puppetlabs/code/
- puppetserver-config:/etc/puppetlabs/puppet/
- puppetserver-data:/opt/puppetlabs/server/data/puppetserver/
dns_search: ${DOMAIN:-test}
networks:
default:
aliases:
- puppet.${DOMAIN:-test}
postgres:
image: postgres:9.6
hostname: postgres.${DOMAIN:-test}
environment:
- POSTGRES_PASSWORD=puppetdb
- POSTGRES_USER=puppetdb
- POSTGRES_DB=puppetdb
healthcheck:
# existence check for puppetdb database
test: [ 'CMD-SHELL', "psql --username=puppetdb puppetdb -c ''" ]
interval: 10s
timeout: 5s
retries: 6
start_period: 2m
expose:
- 5432
volumes:
- puppetdb-postgres:/var/lib/postgresql/data
- ./postgres-custom:/docker-entrypoint-initdb.d
dns_search: ${DOMAIN:-test}
networks:
default:
aliases:
- postgres.${DOMAIN:-test}
puppetdb:
hostname: puppetdb.${DOMAIN:-test}
image: puppet/puppetdb:${PUPPETDB_VERSION:-latest}
environment:
- PUPPERWARE_ANALYTICS_ENABLED=${PUPPERWARE_ANALYTICS_ENABLED:-true}
# This name is an FQDN so the short name puppet doesn't collide outside compose network
- PUPPETSERVER_HOSTNAME=puppet.${DOMAIN:-test}
- PUPPETDB_POSTGRES_HOSTNAME=postgres.${DOMAIN:-test}
- PUPPETDB_PASSWORD=puppetdb
- PUPPETDB_USER=puppetdb
- DNS_ALT_NAMES=puppetdb,${DNS_ALT_NAMES:-}
ports:
- 8080
- 8081
depends_on:
- postgres
- puppet
volumes:
- puppetdb:/opt/puppetlabs/server/data/puppetdb
dns_search: ${DOMAIN:-test}
networks:
default:
aliases:
- puppetdb.${DOMAIN:-test}
volumes:
puppetserver-code:
puppetserver-config:
puppetserver-data:
puppetdb:
puppetdb-postgres: