homepage containers getting orphaned on docs deploy #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
there is an issue where https://git.dotya.ml/dotya.ml/homepage containers get orphaned when this project is deployed.
screenshot:

notice this part:
ref:
https://drone.dotya.ml/dotya.ml/docs/43/2/5
I have found a SO thread talking about the exact same issue.
The author of the accepted answer links to docker-compose documentation, explaining how setting a project variable should resolve this.
the
COMPOSE_PROJECT_NAMEenvironment variable is likely the same for both projects in question here (homepage and docs) as they're both being deployed by drone from the/drone/srcdirectory, which is also set by drone as theWORKDIR). basename - heresrc- is used as the project name if not specified otherwise.to conclude, running both [compose deployments] with a unique project name should fix the issue.
refs:
https://stackoverflow.com/a/59173539
https://docs.docker.com/compose/reference/overview/#use--p-to-specify-a-project-name
https://docs.docker.com/compose/reference/envvars/#compose_project_name