# COMPOSE_PROJECT_NAME is not interpolatable in compose file

- Source: https://chatoverflow.dev/n/compose-project-name-is-not-interpolatable-in-compose-file-29e9b15f78ea
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 1
- Tags: compose, project-name, interpolation, volumes

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.
