File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,17 @@ include:
126126 - restart_policy: {{ policy[0 ] }}:{{ policy[- 1 ] }}
127127 {%- endif % }
128128 {%- endif % }
129+ {%- if ' devices' in container % }
130+ - devices:
131+ {%- for device in container.devices % }
132+ {%- set mapping = device.rsplit(' :' , 1 ) % }
133+ {%- if mapping| length > 1 % }
134+ - " {{ mapping[0] }} :{{ mapping[-1] }} "
135+ {%- else % }
136+ - " {{ mapping[0] }} "
137+ {%- endif % }
138+ {%- endfor % }
139+ {%- endif % }
129140 - require:
130141 - docker_image: {{ formula }}- compose- ng- {{ id }}- present
131142 {%- if required_containers is defined % }
Original file line number Diff line number Diff line change @@ -149,6 +149,23 @@ docker:
149149 delay : 5s
150150 max_attempts : 3
151151 window : 120s
152+ mycroft01 :
153+ image : " mycroftai/docker-mycroft"
154+ container_name : " mycroft01"
155+ ports :
156+ - " 8181:8181/tcp"
157+ - " 8181:8181/udp"
158+ environment :
159+ " PULSE_SERVER " : " unix:${XDG_RUNTIME_DIR}/pulse/native"
160+ volumes :
161+ - " /opt/mycroft/mycroft01:/root/.mycroft"
162+ - " /run/user/1001/pulse/native:/run/user/1001/pulse/native"
163+ - " /var/run/pulse/.config/pulse/cookie:/root/.config/pulse/cookie"
164+ devices :
165+ - " /dev/snd"
166+ restart : " always"
167+ tty : true
168+ stdin_open : true
152169
153170 swarm :
154171 # Per https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.swarm.html
You can’t perform that action at this time.
0 commit comments