forked from saltstack-formulas/docker-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pillar.example
185 lines (170 loc) · 5.4 KB
/
pillar.example
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# example docker registry container
# if you want to your own docker registry, use this
docker-containers:
lookup:
# example docker registry container (if you want your own docker registry, use this)
registry:
# image: 'docker.io/registry:latest' ##Fedora
image: "registry:latest"
cmd: ~
# Pull image on service restart
# (useful if you override the same tag. example: latest)
pull_before_start: true
# Remove container on service start
remove_before_start: false
# Do not force container removal on stop (unless true)
remove_on_stop: false
runoptions:
- "-e REGISTRY_LOG_LEVEL=warn"
- "-e REGISTRY_STORAGE=s3"
- "-e REGISTRY_STORAGE_S3_REGION=us-west-1"
- "-e REGISTRY_STORAGE_S3_BUCKET=my-bucket"
- "-e REGISTRY_STORAGE_S3_ROOTDIRECTORY=/registry"
- "--log-driver=syslog"
- "-p 5000:5000"
- "--rm"
stopoptions:
- '-t 10'
prometheus-server:
# example Prometheus container using command arguments
image: "prom/prometheus:v1.7.1"
cmd: ~
args:
- '-config.file=/prom-data/prometheus.yml'
- '-storage.local.path=/prom-data/data/'
# Pull image on service restart
# (useful if you override the same tag. example: latest)
pull_before_start: true
# Remove container on service start
remove_before_start: false
# Do not force container removal on stop (unless true)
remove_on_stop: false
runoptions:
- '--net="host"'
- '-v /mnt/prom-data:/prom-data'
stopoptions:
- '-t 10'
# Docker service
docker-pkg:
lookup:
process_signature: /usr/bin/docker
# Docker compose supported attributes
docker:
# install_pypi_pip: true
# install_docker_py: true
# version of docker-compose to install (defaults to latest)
# compose_version: 1.9.0
# configfile: /etc/default/docker
install_pypi_pip: true
# yamllint disable-line rule:line-length
### https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
# daemon_config:
# metrics-addr: '0.0.0.0:9323'
# experimental: true
# registry-mirrors:
# - 'https://proxy-docker.local:5000'
# live-restore: true
# insecure-registries:
# - harbor.local
pkg:
# Package handling
# version: 1.13.1
# allow_updates: true
use_upstream_app: false
# config for sysvinit/upstart (for systemd, use drop-ins in your own states)
config:
- DOCKER_OPTS="-s btrfs --dns 8.8.8.8"
- export http_proxy="http://172.17.42.1:3128"
# PIP proxy configuration (defaults to false)
# proxy: proxy.com:3128
# Global functions for docker_container states
containers:
skip_translate: ports
force_present: false
force_running: true
compose:
registry-datastore:
dvc: true
# image: ®istry_image 'docker.io/registry:latest' ## Fedora
image: ®istry_image 'registry:latest'
container_name: &dvc 'registry-datastore'
command: echo *dvc data volume container
volumes:
- &datapath '/registry'
registry-service:
image: *registry_image
container_name: 'registry-service'
volumes_from:
- *dvc
environment:
SETTINGS_FLAVOR: 'local'
STORAGE_PATH: *datapath
SEARCH_BACKEND: 'sqlalchemy'
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: '/registry'
ports:
- 127.0.0.1:5000:5000
# restart: 'always' # compose v1.9
deploy: # compose v3
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
nginx-latest:
# image: 'docker.io/nginx:latest' ##Fedora
image: 'nginx:latest'
container_name: 'nginx-latest'
links:
- 'registry-service:registry'
ports:
- '80:80'
- '443:443'
volumes:
- /srv/docker-registry/nginx/:/etc/nginx/conf.d
- /srv/docker-registry/auth/:/etc/nginx/conf.d/auth
- /srv/docker-registry/certs/:/etc/nginx/conf.d/certs
working_dir: '/var/www/html'
volume_driver: 'foobar'
userns_mode: 'host'
user: 'nginx'
# restart: 'always' # compose v1.9
deploy: # compose v3
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
### DEPRECIATED PILLAR EXAMPLES
# additional pillars supporting backwards compatibility only
# docker-pkg:
# lookup:
# docker-py backwards compatibility
# install_docker_py: true
# python_package: docker==2.1.0
# pip:
# version: '== 8.1.1'
#
# Old docker repositories (docker.io, lxc-docker<=1.7) backwards compatibility
# version: '1.6.2'
# pip_version: '<= 1.2.3'
#
# registry:
# lookup:
# docker registry 2.x backwards compatibility
# version: 2
# restart: always
# runoptions:
# - "-e REGISTRY_LOG_LEVEL=warn"
# - "-e REGISTRY_STORAGE=s3"
# - "-e REGISTRY_STORAGE_S3_REGION=us-west-1"
# - "-e REGISTRY_STORAGE_S3_BUCKET=my-bucket"
# - "-e REGISTRY_STORAGE_S3_ROOTDIRECTORY=my-folder/my-subfolder/my-sub-subfolder"
# - "--log-driver=syslog"
# docker registry < 1, even older backwards compatibility
# amazon:
# aws_bucket: 'my-registry'
# aws_key: 'ABCDEFGHIJK123456789'
# aws_secret: 'AbcD+efG-HIjK1+++23456+789'