implemented compose by url, parse, local yaml.

This commit is contained in:
boris committed 2026-07-10 13:32:40 +01:00
1 parent 53695f4fff
commit 784fff8faf
218 files changed
+2271 -640

No files matched your search

+1
View File
@@ -5,6 +5,7 @@
vars:
docker_app_env_template_src: "{{ playbook_dir }}/../roles/alloy/templates/env.j2"
docker_app_compose_template_src: "{{ playbook_dir }}/../roles/alloy/templates/compose.yaml.j2"
docker_app_compose_override_template_src: "{{ playbook_dir }}/../roles/alloy/templates/compose.override.yaml.j2"
docker_app_name: "{{ alloy_name }}"
docker_app_dir: "{{ alloy_dir }}"
docker_app_image: "{{ alloy_image }}"
@@ -0,0 +1,3 @@
services:
{{ docker_app_name }}: {}
+2 -2
View File
@@ -17,10 +17,10 @@ services:
{% if docker_app_env | length > 0 %}
env_file: .env
{% endif %}
{% if docker_app_routing_mode == "host" and docker_app_ports | length > 0 %}
{% if docker_app_routing_mode in ["host", "traefik_file"] 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 %}"
- "{{ port.bind | default((docker_app_traefik_file_bind_address if docker_app_routing_mode == 'traefik_file' else '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 %}
+7
View File
@@ -0,0 +1,7 @@
# Upstream Snapshot
This directory stores copied upstream reference files for the `alloy` role.
See `docs/upstream-sources.yml` for repository URLs, refs, README paths, Compose paths, and verification status.
Snapshot files are reference material only. Deployments are generated from this role's `templates/` directory.
+23
View File
@@ -0,0 +1,23 @@
services:
grafana-alloy:
image: grafana/alloy:latest
container_name: grafana-alloy
ports:
- '12345:12345'
volumes:
# mount config file
- './grafana/alloy/config.alloy:/etc/alloy/config.alloy'
# give access to running docker containers for discovery.docker
- /var/run/docker.sock:/var/run/docker.sock
# give access to docker's log files directory (optional)
- /var/lib/docker/containers:/var/lib/docker/containers:ro
environment:
# pass environment variables for config.alloy
GRAFANA_LOKI_URL: ${GRAFANA_LOKI_URL}
GRAFANA_LOKI_USERNAME: ${GRAFANA_LOKI_USERNAME}
# GRAFANA_CLOUD_API_KEY: ${GRAFANA_CLOUD_API_KEY}
command:
- run
- --server.http.listen-addr=0.0.0.0:12345
- --storage.path=/var/lib/alloy/data
- /etc/alloy/config.alloy