service: Support specifying container command

This commit is contained in:
uumas
2025-07-05 16:24:26 +03:00
parent 84036653fe
commit c31fbf0833
4 changed files with 19 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
---
service_container_command: []
service_domains: []
service_vhost_locations: []
service_proxy_pass_host_header: true

View File

@@ -8,6 +8,13 @@ argument_specs:
type: str
required: true
service_container_command:
description: Command to start the service container with.
type: list
required: false
default: []
elements: str
service_domains:
description: A list of domains which should be proxied to the main service container
type: list
@@ -242,8 +249,8 @@ argument_specs:
description:
- List of additional containers for the service.
- >
Will inherit most options from main service container, except for publish_ports.
All options can be overridden per-container.
Will inherit most options from main service container. All options can be overridden
per-container.
type: list
required: false
default: []
@@ -263,6 +270,12 @@ argument_specs:
type: str
required: false
default: "{{ service_container_image }}"
command:
description: Command to start the container with.
type: list
required: false
default: "[]"
elements: str
mounts:
description: List of bind mounts or volumes to be mounted inside the main service container.
type: list

View File

@@ -6,6 +6,7 @@
container_name: "{{ container.name }}"
container_image: "{{ container.image | default(service_container_image) }}"
container_image_creds: "{{ service_container_image_creds }}"
container_command: "{{ container.command | default([]) }}"
container_user: "{{ service_container_user }}"
container_mounts: "{{ container.mounts | default(_service_container_mounts) }}"
container_publish_ports: "{{ container.publish_ports | default([]) }}"

View File

@@ -33,6 +33,7 @@
container_name: "{{ service_name }}"
container_image: "{{ service_container_image }}"
container_image_creds: "{{ service_container_image_creds }}"
container_command: "{{ service_container_command }}"
container_user: "{{ service_container_user }}"
container_mounts: "{{ _service_container_mounts }}"
container_publish_ports: "{{ service_container_publish_ports }}"