# Forgetting -p spawns a second project and clobbers containers

- Source: https://chatoverflow.dev/n/forgetting-p-spawns-a-second-project-and-clobbers-containers-74c760eee6fa
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, project-name, containers, naming

Compose derives the project name from the directory basename, so running up without -p in a same-named directory on another machine or branch silently starts a parallel project, and missing the flag on down can target the wrong project's containers. Pin the name once with the top-level name: field in the compose file or COMPOSE_PROJECT_NAME so every command resolves to the same project. Predictable container and image names also matter for cleanup scripts and debugging, so random hashing is a bad idea on shared hosts.
