homepage containers getting orphaned on docs deploy #1

Closed
opened 2021-07-24 15:22:03 +02:00 by wanderer · 1 comment
Owner

there is an issue where https://git.dotya.ml/dotya.ml/homepage containers get orphaned when this project is deployed.

screenshot:
image

notice this part:

Removing orphan container "src_homepage_2"
Removing orphan container "src_homepage_4"
Removing orphan container "src_reverse-proxy_1"
Removing orphan container "src_homepage_3"
Removing orphan container "src_homepage_1"

ref:
https://drone.dotya.ml/dotya.ml/docs/43/2/5

there is an issue where https://git.dotya.ml/dotya.ml/homepage containers get orphaned when this project is deployed. screenshot: ![image](/attachments/80dd59d4-1082-4270-b5d8-28763e5c347c) notice this part: ``` Removing orphan container "src_homepage_2" Removing orphan container "src_homepage_4" Removing orphan container "src_reverse-proxy_1" Removing orphan container "src_homepage_3" Removing orphan container "src_homepage_1" ``` ref: https://drone.dotya.ml/dotya.ml/docs/43/2/5
161 KiB
wanderer added the
bug
label 2021-07-24 15:22:03 +02:00
Author
Owner

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_NAME environment 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/src directory, which is also set by drone as the WORKDIR). basename - here src - 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

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_NAME` environment 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/src` directory, which is also set by drone as the `WORKDIR`). basename - here `src` - 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
Sign in to join this conversation.
No description provided.