mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 03:15:56 +00:00
The sidecar script contains no shell dollars anymore, so the swarm-only replace escape is dead; tests pin the exec-as-PID1 shape and the dollar-free invariant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
1.1 KiB
Django/Jinja
30 lines
1.1 KiB
Django/Jinja
{% if lookup('objstore', application_id, 'local') %}
|
|
{% set _objstore = lookup('objstore', application_id) %}
|
|
seaweedfs:
|
|
image: "{{ _objstore.image }}:{{ _objstore.version }}" # nocheck: container-image-lookup
|
|
{{ lookup('compose_only', 'container_name', _objstore.container) }}
|
|
{{ lookup('compose_restart', DOCKER_RESTART_POLICY) }}
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
{% set _sidecar = _objstore.bucket | seaweedfs_sidecar_script(_objstore.port, _objstore.access_key, _objstore.secret_key) %}
|
|
command: {{ [_sidecar] | to_json }}
|
|
volumes:
|
|
- seaweedfs:/data
|
|
networks: # nocheck: networks-literal
|
|
- default
|
|
logging:
|
|
driver: journald
|
|
{% macro include_resource_for(svc, indent=4) -%}
|
|
{% set service_name = svc -%}
|
|
{%- set _snippet -%}
|
|
{% include 'roles/sys-svc-container/templates/resource.yml.j2' %}
|
|
{%- endset -%}
|
|
{{ _snippet | indent(indent, true) }}
|
|
{%- endmacro %}
|
|
{% if DEPLOYMENT_MODE == 'compose' %}
|
|
{{ include_resource_for('seaweedfs') }}
|
|
{% endif %}
|
|
{% set service_name = 'seaweedfs' %}
|
|
{% include 'roles/sys-svc-container/templates/deploy.yml.j2' %}
|
|
{% endif %}
|
|
{{ "\n" }}
|