Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "docker-compose down" to use the appropriate files to avoid tear-down errors #275

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

aforward
Copy link
Contributor

@aforward aforward commented Oct 4, 2022

Ahh, so docker-compose down needs to load the "right" environment

If you run

$ docker-compose down && echo "WORKED"

Then you will see

WARNING: The USER_SERVICE_URL variable is not set. Defaulting to a blank string.
Stopping ember                  ... done
Stopping proxy                  ... done
Stopping pass-docker_postgres_1 ... done
WARNING: Found orphan containers (pass-docker_elide_1, pass-docker_auth_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Removing ember                  ... done
Removing proxy                  ... done
Removing pass-docker_postgres_1 ... done
Removing network pass-docker_front
ERROR: error while removing network: network pass-docker_front id caa98279855e037d6ef32e4af314c6b7f1a66715c2664fcb4adcb092a6945a06 has active endpoints

And that error will stop the build

If you run with the appropriate files, then it will work as expected

$ docker-compose -f eclipse-pass.base.yml -f eclipse-pass.demo.yml down && echo "WORKED"
Stopping pass-docker_elide_1 ... done
Stopping pass-docker_auth_1  ... done
Removing pass-docker_elide_1 ... done
Removing pass-docker_auth_1  ... done
Removing network pass-docker_back
Removing network pass-docker_front
WORKED

…down errors

Ahh, so docker-compose down needs to load the "right" environment

If you run

```
$ docker-compose down && echo "WORKED"
```

Then you will see

```
WARNING: The USER_SERVICE_URL variable is not set. Defaulting to a blank string.
Stopping ember                  ... done
Stopping proxy                  ... done
Stopping pass-docker_postgres_1 ... done
WARNING: Found orphan containers (pass-docker_elide_1, pass-docker_auth_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Removing ember                  ... done
Removing proxy                  ... done
Removing pass-docker_postgres_1 ... done
Removing network pass-docker_front
ERROR: error while removing network: network pass-docker_front id caa98279855e037d6ef32e4af314c6b7f1a66715c2664fcb4adcb092a6945a06 has active endpoints
```

And that error will stop the build

If you run with the appropriate files, then it will work as expected

```
$ docker-compose -f eclipse-pass.base.yml -f eclipse-pass.demo.yml down && echo "WORKED"
```

```
Stopping pass-docker_elide_1 ... done
Stopping pass-docker_auth_1  ... done
Removing pass-docker_elide_1 ... done
Removing pass-docker_auth_1  ... done
Removing network pass-docker_back
Removing network pass-docker_front
WORKED
```
@aforward
Copy link
Contributor Author

aforward commented Oct 4, 2022

Screen Shot 2022-10-04 at 14 59 49

@aforward aforward merged commit 35e9739 into main Oct 5, 2022
@aforward aforward deleted the 294-fix-gh-actions-down branch October 5, 2022 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants