If I specify COMPOSE_PROJECT_NAME environment variable, the services defined in the compose file start with the value of the env var prepended to the name of the service. Also, there is a number appended to the service name.
E.g.
services:
web:
image: web
causes myproj_services_1 to be started.
Another service has the environment section as:
myserver:
environment:
WEBSERVER:web
When container myproj_myserver_1 starts, it gets the value web for WEBSERVER. Clearly this is an incorrect value as the real name of the container is mproj_web_1.
Is it possible to tell docker compose to use the real name of the container running the service?