Initialise repository structure and placeholder files. Generic functionality works i guess, need to come up with a better solution for compose templates

This commit is contained in:
boris committed 2026-07-08 10:29:51 +01:00
commit 53695f4fff
411 files changed
+7817

No files matched your search

@@ -0,0 +1,90 @@
services:
{{ docker_app_name }}:
image: {{ docker_app_image }}
restart: {{ docker_app_restart }}
{% if docker_app_command | length > 0 %}
command: {{ docker_app_command | to_json }}
{% endif %}
{% if docker_app_user | length > 0 %}
user: "{{ docker_app_user }}"
{% endif %}
{% if docker_app_network_mode | length > 0 %}
network_mode: {{ docker_app_network_mode }}
{% endif %}
{% if docker_app_privileged | bool %}
privileged: true
{% endif %}
{% if docker_app_env | length > 0 %}
env_file: .env
{% endif %}
{% if docker_app_routing_mode == "host" and docker_app_ports | length > 0 %}
ports:
{% for port in docker_app_ports %}
- "{{ port.bind | default('0.0.0.0') }}:{{ port.host | default(port.container) }}:{{ port.container }}{% if port.protocol | default('tcp') != 'tcp' %}/{{ port.protocol }}{% endif %}"
{% endfor %}
{% endif %}
{% if docker_app_routing_mode == "traefik" and docker_app_service_port %}
# internal service port: {{ docker_app_service_port }}; not published on the Docker host
labels:
- traefik.enable=true
- traefik.http.routers.{{ docker_app_name }}.rule={{ docker_app_traefik_rule }}
- traefik.http.routers.{{ docker_app_name }}.entrypoints={{ docker_app_traefik_entrypoint }}
- traefik.http.routers.{{ docker_app_name }}.tls={{ docker_app_traefik_tls | bool | ternary('true', 'false') }}
{% if docker_app_traefik_middlewares | length > 0 %}
- traefik.http.routers.{{ docker_app_name }}.middlewares={{ docker_app_traefik_middlewares | join(',') }}
{% endif %}
- traefik.http.services.{{ docker_app_name }}.loadbalancer.server.port={{ docker_app_service_port }}
{% for key, value in docker_app_labels.items() %}
- {{ key }}={{ value }}
{% endfor %}
{% elif docker_app_labels | length > 0 %}
labels:
{% for key, value in docker_app_labels.items() %}
- {{ key }}={{ value }}
{% endfor %}
{% endif %}
{% if docker_app_volumes | length > 0 %}
volumes:
{% for volume in docker_app_volumes %}
- {{ volume }}
{% endfor %}
{% endif %}
{% if docker_app_devices | length > 0 %}
devices:
{% for device in docker_app_devices %}
- {{ device }}
{% endfor %}
{% endif %}
{% if docker_app_cap_add | length > 0 %}
cap_add:
{% for capability in docker_app_cap_add %}
- {{ capability }}
{% endfor %}
{% endif %}
{% if docker_app_group_add | length > 0 %}
group_add:
{% for group in docker_app_group_add %}
- "{{ group }}"
{% endfor %}
{% endif %}
{% if docker_app_extra_hosts | length > 0 %}
extra_hosts:
{% for host in docker_app_extra_hosts %}
- {{ host }}
{% endfor %}
{% endif %}
{% if docker_app_depends_on | length > 0 %}
depends_on:
{% for dependency in docker_app_depends_on %}
- {{ dependency }}
{% endfor %}
{% endif %}
{% if docker_app_routing_mode == "traefik" and docker_app_network_mode | length == 0 %}
networks:
- {{ docker_app_traefik_network }}
{% endif %}
{% if docker_app_routing_mode == "traefik" and docker_app_network_mode | length == 0 %}
networks:
{{ docker_app_traefik_network }}:
external: true
{% endif %}
+4
View File
@@ -0,0 +1,4 @@
{% for key, value in docker_app_env.items() %}
{{ key }}={{ value }}
{% endfor %}