Redis with gitlab-ci

So, it was required to implement redis into the project, after which it is necessary to update gitlab-ci.yaml. It was decided to add Redis as a service following the example of postgres.
Here is my .yaml file:
Here is the text of the error:
Here are the settings in the app:

"Redis": {
    "Lock": "ON",
    "LockPeriod": "10",
    "Host": "redis",
    "Port": "6379"

I tried env, various options for them (localhost, redis, redis://redis:6379 and others). I changed the settings in the application itself - all in vain.
It is obvious that the connection string is formed incorrectly. But what in fact the line is obtained, I can not see. Or tell me how to see it…