mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
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`.
40 lines
812 B
Cheetah
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 }}
|