Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

docker.py uses wrong container name #13

Closed
MHuberFaust opened this issue Nov 2, 2021 · 6 comments
Closed

docker.py uses wrong container name #13

MHuberFaust opened this issue Nov 2, 2021 · 6 comments

Comments

@MHuberFaust
Copy link
Contributor

Hi,
I freshly installed RaiseWikibase and could not use the scripts properly. After a while I found the problem:

Container names have hyphens in their name.

docker_names() in docker.py uses underscores instead if hyphens:

if names: names = [s.decode('ascii').replace('\n', '') for s in names] mysql = [k for k in names if '_mysql_' in k][0] wikibase = [k for k in names if '_wikibase_' in k][0]

adjusting the code to
if names: names = [s.decode('ascii').replace('\n', '') for s in names] mysql = [k for k in names if '-mysql-' in k][0] wikibase = [k for k in names if '-wikibase-' in k][0]

solved the issue.

It might be useful adjust the command from this issue as well: #4

Best,
Michael

@shigapov
Copy link
Collaborator

shigapov commented Nov 2, 2021

Hi Michael, thank you for reporting this. I did test it with hyphens in Debian, it worked. Are you running it on Windows?

@MHuberFaust
Copy link
Contributor Author

I run it on Mac.

@MHuberFaust
Copy link
Contributor Author

So this is weird: I cleared the data from my wikibase instance (as mentioned in youre Readme) and the container names went back to "normal" (names with underscores).
Do you have any ideas?

Screenshot 2021-11-11 at 07 45 38

I can work around that, no big deal, just seems strange :)

@shigapov
Copy link
Collaborator

Yeah, that's strange. No idea what's that. Since now it works as expected, I am closing the issue. Please reopen if it will repeat.

@MHuberFaust
Copy link
Contributor Author

It happened again after a docker desktop update. Switching back to docker compose v1 did it for me.

here is a good explanation.
Since the latest versions of docker compose moved away from underscores it might be useful to adjust the code to fit both versions.

@shigapov
Copy link
Collaborator

I see, thank you! I'll fix it now.

@shigapov shigapov reopened this Nov 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants