Setting a variable name as the service

I need to put a variable name on the service in my yml file used to deploy a feature branch from gitlab into Rancher. The variable will be from gitlab -> CI_COMMIT_REF_SLUG. I have tried to get the name feature to be the variable. The yml setup keeps deploying the word “feature” as the name for the subdomain that appears at feature.mywebsite.com.

What do I need to change in my yml to get the ${CI_COMMIT_REF_SLUG} to be deployed as the subdomain?

Here is my feature.yml file.

version: ‘2’
services:
feature:
container_name: {CI_COMMIT_REF_SLUG} image: my.image.com/site/feature:{CI_BUILD_REF}
expose:
- “4500”
labels:
sxg.service.type: web
sxg.service.port: 4500
health_check:
port: 4500
request_line: GET / HTTP/1.0
interval: 10000
healthy_threshold: 2
unhealthy_threshold: 3
response_timeout: 10000