forked from saltstack-formulas/docker-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pillar.example
194 lines (184 loc) · 5.07 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
186
187
188
189
190
191
192
193
194
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
docker:
wanted:
- docker
- compose
pkg:
docker:
# choice is 'archive' (default) or 'repo' (yum/apt)
use_upstream: archive # or repo
service:
name: docker
env: HTTP_PROXY=http://YOUR_PROXY_IP_ADDRESS:PROXY_PORT
environ:
# yamllint disable-line rule:line-length
- OPTIONS='-s devicemapper --storage-opt dm.fs=xfs --exec-opt native.cgroupdriver=cgroupfs --selinux-enabled'
# yamllint enable-line rule:line-length
- DOCKER_OPTS="-s btrfs --dns 8.8.8.8"
- export http_proxy="http://172.17.42.1:3128"
daemon_config:
insecure-registries: []
networks:
- nginxnet
containers:
running:
- nginx
- prometheus
nginx:
image: "nginx:latest"
prometheus:
image: "prom/prometheus:v1.7.1"
env:
- a=b
- ping=pong
- ding=dong
command:
- ls
- ls -l
auto_remove: true
blkio_weight: 1000
cap_add: ["SYS_ADMIN", "MKNOD"]
dns:
- 8.8.8.8
- 8.8.4.4
dns_search:
- EXAMPLE.COM
domainname:
- EXAMPLE.COM
entrypoint:
- ls
- ls -l
- ls -last
- sleep 100
init: false
labels:
- label1
- label2
- label3
mem_limit: 1g
mem_swappiness: 50
name: prometheus
network_disabled: false
network_mode: host # bridge or none or container:netcontainer or host
oom_kill_disable: true
oom_score_adj: 100
pid_mode: host
pids_limit: -1
privileged: false
publish_all_ports: true
read_only: false
stdin_open: false
tty: true
volume_driver: local
# if you want to your own docker registry, use this
registry:
image: "registry:latest"
env:
- REGISTRY_LOG_LEVEL=warn
- REGISTRY_STORAGE=s3
- REGISTRY_STORAGE_S3_REGION=us-west-1
- REGISTRY_STORAGE_S3_BUCKET=my-bucket
- REGISTRY_STORAGE_S3_ROOTDIRECTORY=/registry
networks:
- nginxnet
command:
- "--log-driver=syslog"
- "-p 5000:5000"
- "--rm"
compose:
## salt dockercompose module ##
applications:
- composetest
composetest:
path: /srv/salt/docker/files/composetest/docker-compose.yml
## formerly compose-ng state ##
ng:
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'
networks:
- nginxnet
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: 'local'
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
mycroft01:
image: "mycroftai/docker-mycroft"
container_name: "mycroft01"
ports:
- "8181:8181/tcp"
- "8181:8181/udp"
environment:
"PULSE_SERVER": "unix:${XDG_RUNTIME_DIR}/pulse/native"
volumes:
- "/opt/mycroft/mycroft01:/root/.mycroft"
- "/run/user/1001/pulse/native:/run/user/1001/pulse/native"
- "/var/run/pulse/.config/pulse/cookie:/root/.config/pulse/cookie"
devices:
- "/dev/snd"
restart: "always"
tty: true
stdin_open: true
swarm:
# Per https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.swarm.html
joinswarm: {}
leave_swarm: false
node_ls: {}
remove_node: {}
remove_service: {}
service_create: {}
swarm_init:
advertise_addr: 127.0.0.1
listen_addr: 0.0.0.0
force_new_cluster: true
service_info: {}
swarm_tokens: true
update_node: {}
misc:
skip_translate: ports
force_present: false
force_running: true