Files
dokku/plugins/logs/templates/compose.yml.tmpl
Jose Diaz-Gonzalez a4e6d06fd1 fix: reject app-level vector-networks and vector-image, drop bridge from joined nets
The Docker daemon refuses any endpoint settings on the default bridge network and `docker compose` unconditionally attaches the service name as an alias on every joined network, so combining bridge with user-defined networks via compose's `networks:` block is impossible. When `vector-networks` is set, the compose template now joins only the configured networks; outbound to external sinks still works through user-defined network NAT. Additionally, `vector-image` and `vector-networks` are both global-only but `common.CommandPropertySet` silently accepts them at app level by merging global-only keys into the valid-property set, so both now reject explicitly in `validateSetValue`.
2026-05-12 23:45:10 -04:00

40 lines
812 B
Cheetah

---
services:
vector:
image: "{{ $.VectorImage }}"
command:
- "--config"
- "/etc/vector/vector.json"
- "--watch-config"
labels:
dokku: ""
org.label-schema.schema-version: "1.0"
org.label-schema.vendor: dokku
{{- if $.VectorNetworks }}
networks:
{{- range $name := $.VectorNetworks }}
{{ $name }}: {}
{{- end }}
{{- else }}
network_mode: bridge
{{- end }}
restart: unless-stopped
volumes:
- "{{ $.DokkuLibRoot }}/data/logs:/etc/vector"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "{{ $.DokkuLogsDir }}/apps:/var/log/dokku/apps"
{{- if $.VectorNetworks }}
networks:
{{- range $name := $.VectorNetworks }}
{{ $name }}:
name: {{ $name }}
external: true
{{- end }}
{{- end }}