Skip to content

Commit 6f00e89

Browse files
committed
Maintenance: Allow passing docker cmd options
1 parent ac1585d commit 6f00e89

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ deploy:
187187
# The Traefik image to use, defaults to traefik:v3.2.1
188188
image: traefik:v3.2.0
189189

190+
# Additional docker container command options
191+
options:
192+
publish: 8888:8888
193+
190194
# Additional arguments to pass to the Traefik container
191195
args:
192196
configfile: /etc/traefik/traefik.yml

lib/supervisor/app/services/supervisor.rb

+8
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def build_command
4949
--volume /var/run/docker.sock:/var/run/docker.sock
5050
--volume /var/lib/supervisor:/rails/storage
5151
]
52+
command += build_options
5253
command += ['--network', network_name]
5354
command += build_labels
5455
command += build_env
@@ -84,6 +85,13 @@ def build_env
8485

8586
argumentize(env, prefix: '--env ')
8687
end
88+
89+
def build_options
90+
options = {}
91+
options.merge!(@settings.deploy&.supervisor&.options || {})
92+
93+
argumentize(options, prefix: '--')
94+
end
8795
end
8896
end
8997
end

lib/supervisor/app/services/traefik.rb

+8
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def build_command
4949
--volume /var/lib/traefik:/etc/traefik
5050
--publish 80:80 --publish 443:443
5151
]
52+
command += build_options
5253
command += ['--network', network_name]
5354
command += build_env
5455
command += [set_image]
@@ -83,6 +84,13 @@ def build_env
8384

8485
argumentize(env, prefix: '--env ')
8586
end
87+
88+
def build_options
89+
options = {}
90+
options.merge!(@settings.deploy&.traefik&.options || {})
91+
92+
argumentize(options, prefix: '--')
93+
end
8694
end
8795
end
8896
end

0 commit comments

Comments
 (0)