Pin project name in default docker-compose.yml
Without an explicit name, Docker Compose derives the project name from the directory basename. Renaming the directory silently orphans all named volumes (devbox-data, devbox-state, devbox-shell-history, etc.) because the new project name no longer matches the old volume prefixes. Pin to 'opencode-devbox' so volumes survive directory moves and renames.
This commit is contained in:
@@ -8,6 +8,11 @@
|
|||||||
# Or for interactive one-shot:
|
# Or for interactive one-shot:
|
||||||
# docker compose run --rm devbox
|
# docker compose run --rm devbox
|
||||||
|
|
||||||
|
# Pin the project name so named volumes survive directory renames.
|
||||||
|
# Without this, Docker Compose derives the project name from the
|
||||||
|
# directory basename — renaming the dir orphans all existing volumes.
|
||||||
|
name: opencode-devbox
|
||||||
|
|
||||||
services:
|
services:
|
||||||
devbox:
|
devbox:
|
||||||
image: joakimp/opencode-devbox:latest
|
image: joakimp/opencode-devbox:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user