Zum Inhalt springen

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.

mdocker profile
mdocker profile list # known templates
mdocker profile show shopware-dockware # the effective YAML
mdocker profile show generic --default # force the bundle/generic starter
mdocker profile path shopware-dockware # where the effective template lives

profile show prints the effective template: your user override if you have one, otherwise the bundled default.

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. orbitorbit-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):

a profile template
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: true
write a custom profile
# Validate a template (yq syntax + placeholder check)
mdocker profile validate ./my-profile.yml
cat ./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-profile

Saved profiles land in ~/.config/multi-docker/profiles/<name>.yml and take precedence over any bundled template of the same name.

reset & re-render
mdocker profile reset my-profile # back to the bundled default
mdocker profile reset my-profile --purge # allow deleting a custom-only profile
mdocker profile rerender-affected my-profile # re-render every project on this profile

After 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>.