# How to fix/set rancher container name deployed by deploying stack template

**URL:** <https://forums.suse.com/t/how-to-fix-set-rancher-container-name-deployed-by-deploying-stack-template/21420>\
**Category:** Rancher 1.x\
**Created:** [October 14, 2021, 1:01pm UTC](https://forums.suse.com/t/how-to-fix-set-rancher-container-name-deployed-by-deploying-stack-template/21420 "2021-10-14T13:01:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolotux](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/lolotux/32/8119_2.png) [@lolotux](https://forums.suse.com/u/lolotux)\
**Post date:** [October 14, 2021, 1:01pm UTC](https://forums.suse.com/t/how-to-fix-set-rancher-container-name-deployed-by-deploying-stack-template/21420/1 "2021-10-14T13:01:38Z")

</div>

Hi everybody!

My problem is simple. I have to play a docker-compose with a yml file (instances.yml) to generate certificates for 5 containers : 3 ES + 1 Kibana + 1 logstash.  
This compose file (instances.yml) have to know container name before deploying stack to populate a docker volumes with certificate.

And when you deploy Rancher template container name $name is formated as : r-$PROJECT-$name-1-$UID

Then instances.yml must contain the real name!

```auto
instances:
    - name: r-${PROJECT}-es01-1-$UID
      dns:
        - es01

```

But we don’t know (as I knew) $UID before deploying!

Tks in advance
