service: Imrove native sockets
This commit is contained in:
@@ -29,9 +29,7 @@ argument_specs:
|
||||
service_container_http_port:
|
||||
description:
|
||||
- Port inside the container where http requests are proxied to.
|
||||
- >-
|
||||
If set to 0, /run/{{ service_name }}.sock on the host is bind mounted to /run/{{ service_name }}.sock inside the container
|
||||
and http requests are proxied to it.
|
||||
- If set to 0, http requests are proxied to /run/<service name>.sock inside the container
|
||||
type: int
|
||||
required: false
|
||||
default: 0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# {{ ansible_managed }}
|
||||
[Unit]
|
||||
Description={{ service_name }} socket
|
||||
Requires={{ service_name }}.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/{{ service_name }}.sock
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
_service_container_socket_mount:
|
||||
type: bind
|
||||
source: /run/{{ service_name }}
|
||||
destination: /run/{{ service_name }}
|
||||
source: /run/{{ service_name }}.sock
|
||||
destination: /run/{{ service_name }}.sock
|
||||
|
||||
_service_volume_mounts: "{{ service_container_mounts | selectattr('type', '==', 'volume') }}"
|
||||
_service_template_mounts: "{{ service_container_mounts | selectattr('type', '==', 'template') }}"
|
||||
|
||||
Reference in New Issue
Block a user