Writing & Customizing Profiles
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
A profile is the override template MultiDocker applies to a project. The bundled profiles cover common stacks, but you can inspect, edit and add your own.
Inspect the current profiles
Section titled “Inspect the current profiles”mdocker profile list # known templatesmdocker profile show shopware-dockware # the effective YAMLmdocker profile show generic --default # force the bundle/generic startermdocker profile path shopware-dockware # where the effective template livesprofile show prints the effective template: your user override if you have one,
otherwise the bundled default.
The placeholder system
Section titled “The placeholder system”A profile template is a compose override with placeholders that engine/render.sh
substitutes per project:
| Placeholder | Replaced with |
|---|---|
{{name}} |
The project name (used in Traefik router/service names). |
{{base_domain}} |
The primary base domain. |
{{hostname}} |
The first non-wildcard hostname (for APP_URL and similar). |
{{hostname_api}} |
A derived API host: first label + -api (e.g. orbit → orbit-api). |
{{hosts_rule}} |
The full Traefik host rule (`Host(…) |
At render time, services that appear in the template but not in the project’s
original compose are dropped, and services disabled with profiles: ["off"] are
automatically un-referenced from any depends_on/links so compose stays valid.
Here is the shape of a template (excerpt from shopware-dockware):
services: proxy: ports: !reset [] networks: [default, edge] labels: - "traefik.enable=true" - "traefik.http.routers.{{name}}.rule={{hosts_rule}}" - "traefik.http.routers.{{name}}.tls=true" shop: environment: APP_URL: "https://{{hostname}}"
networks: edge: name: multi-docker-edge external: trueValidate and save your own
Section titled “Validate and save your own”# Validate a template (yq syntax + placeholder check)mdocker profile validate ./my-profile.ymlcat ./my-profile.yml | mdocker profile validate --stdin --json
# Save it as a user override (validated unless --force)cat ./my-profile.yml | mdocker profile save my-profileSaved profiles land in ~/.config/multi-docker/profiles/<name>.yml and take
precedence over any bundled template of the same name.
Reset and re-render
Section titled “Reset and re-render”mdocker profile reset my-profile # back to the bundled defaultmdocker profile reset my-profile --purge # allow deleting a custom-only profilemdocker profile rerender-affected my-profile # re-render every project on this profileAfter editing a profile, run profile rerender-affected so all projects using it pick
up the change (it prints the JSON array of re-rendered project names). To re-render a
single project regardless of profile, use mdocker rerender <name>.
Related
Section titled “Related”- CLI:
profile - Concept: Profiles & Templating
- Registering & Detecting Projects
Cookie-Einstellungen
Statistik-Werkzeuge setzen wir nur ein, wenn du zustimmst. Die notwendige Speicherung hält die Seite funktionsfähig; alles andere bleibt aus, bis du entscheidest.
Speichert deine Entscheidung aus diesem Dialog in deinem Browser (localStorage). Kein Cookie, keine Weitergabe an Dritte.
Google Analytics 4 über den Google Tag Manager, um die Nutzung der Seite zu messen. Wird erst nach deiner Einwilligung geladen.