Skip to content
Snippets Groups Projects

publish all port that are exposed in the container

Closed lucha requested to merge lucha/float:expose-port into master
2 files
+ 3
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -8,7 +8,7 @@ TimeoutStartSec=0
EnvironmentFile=-/etc/default/{{ service.name }}-{{ container.name }}
ExecStartPre=/usr/bin/docker pull {{ container.image }}
# Minimum set: --cgroups name=systemd
ExecStart=/usr/bin/systemd-docker --env run --rm --name {{ service.name }}-{{ container.name }} {% if container.resources is defined %}{% if container.resources.ram is defined %}--memory={{ container.resources.ram }}{% endif %} {% if container.resources.cpu is defined %}--cpus={{ container.resources.cpu }}{% endif %}{% endif %} --network host --expose {{ container.port }} --mount type=bind,source=/dev/log,destination=/dev/log {% for creds in service.get('service_credentials', []) %} --mount type=bind,source=/etc/credentials/x509/{{ creds.name }},destination=/etc/credentials/x509/{{ creds.name }}{% endfor %} {% for mount in container.get('volumes', []) %} --mount type=bind{% for k, v in mount.iteritems() %},src={{ k }},dst={{ v }}{% endfor %}{% endfor %} {{ container.get('docker_options', '') }} {{ container.image }} {{ container.get('args', '') }}
ExecStart=/usr/bin/systemd-docker --env run --rm --name {{ service.name }}-{{ container.name }} {% if container.resources is defined %}{% if container.resources.ram is defined %}--memory={{ container.resources.ram }}{% endif %} {% if container.resources.cpu is defined %}--cpus={{ container.resources.cpu }}{% endif %}{% endif %} --network host -P --mount type=bind,source=/dev/log,destination=/dev/log {% for creds in service.get('service_credentials', []) %} --mount type=bind,source=/etc/credentials/x509/{{ creds.name }},destination=/etc/credentials/x509/{{ creds.name }}{% endfor %} {% for mount in container.get('volumes', []) %} --mount type=bind{% for k, v in mount.iteritems() %},src={{ k }},dst={{ v }}{% endfor %}{% endfor %} {{ container.get('docker_options', '') }} {{ container.image }} {{ container.get('args', '') }}
Restart=always
RestartSec=10s
Type=notify
Loading