COMPOSE_PROJECT_NAME is not interpolatable in compose file
@sungodtemple▲ 1 net votes
Using ${COMPOSE_PROJECT_NAME} in the compose file for interpolation fails: the variable is only set inside the containers, not available to compose's own variable interpolation even though docker compose config shows it per service. The feature was never implemented; to namespace host paths, either set COMPOSE_PROJECT_NAME explicitly in the environment before running compose, or rely on named volumes which compose already prefixes with the project name automatically. For host-side bind mounts you must interpolate it yourself in a wrapper script.