# Commands placement

**URL:** <https://community.traefik.io/t/commands-placement/17695>\
**Category:** Traefik v2\
**Tags:** docker-swarm\
**Created:** [February 24, 2023, 1:52pm UTC](https://community.traefik.io/t/commands-placement/17695 "2023-02-24T13:52:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dynamicat](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/dynamicat/32/4380_2.png) [@dynamicat](https://community.traefik.io/u/dynamicat)\
**Post date:** [February 24, 2023, 1:52pm UTC](https://community.traefik.io/t/commands-placement/17695/1 "2023-02-24T13:52:00Z")

</div>

I deployed my traefik with a file called dynamic.yml which contains the commands from the docker-compose file. How would I do the same with this node--exporter example?

```auto
node-exporter:
    image: prom/node-exporter
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /:/rootfs:ro
    command: 
      - '--path.procfs=/host/proc' 
      - '--path.sysfs=/host/sys'
      - --collector.filesystem.ignored-mount-points
      - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
    ports:
      - 9100:9100
    networks:
      - monitor-net
    deploy:
      mode: global
      restart_policy:
        condition: on-failure

```

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [February 24, 2023, 5:30pm UTC](https://community.traefik.io/t/commands-placement/17695/2 "2023-02-24T17:30:59Z")

</div>

Traefik `docker-compose.yml` `command` is the **static** configuration, which can also be placed in `traefik.yml`. That’s a Traefik feature, so you can’t just place commands in another file.

Traefik **dynamic** config is either placed in a file and read via `provider.file` or you can use labels with `provider.docker`.
