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

The setup script fails #47

Open
chytonpide opened this issue Apr 25, 2022 · 0 comments
Open

The setup script fails #47

chytonpide opened this issue Apr 25, 2022 · 0 comments

Comments

@chytonpide
Copy link
Contributor

Starting rabbitMQ container fails on Mac because of the invalid node name.

startContainers.sh use hostname as RABBITMQ_NODENAME.

rabbitmqNodeName="$(hostname)"
...
docker run --name "${rabbitmqContainerName}" -p 5672:5672 -p "${rabbitmqManagementHttpPort}":15672 
-e RABBITMQ_NODENAME="${rabbitmqNodeName}" -d rabbitmq:3-management

Dots are not available as RABBITMQ_NODENAME.
but, on Mac, $(hostname) is like "chytonpide_mac.local" as a default.
(There is a very high probability that the hostname contains a dot, even if it is a different system.)

I think it is unnecessary to use the "RABBITMQ_NODENAME" environment variable.
So I suggest deleting the "RABBITMQ_NODENAME" environment variable on the line that runs the RabbitMQ container or using a static node name that does not include dots.

SQLs execution fails after starting MySQL container because MySQL server is not ready.

As soon as the container is ready, SQLs are executed. But, executions fail because the Mysql server is not prepared even if the container is ready.

I suggest having a delay after the container is ready.

waitForContainer "${mysqlContainerName}" "mysqld: ready for connections."

sleep 30

Not the best solution, but it works and is simple :)

Using docker-compose

I suggest replacing the setup script with docker-compose.
I think it makes the setup process easier to maintain. it also could be used in Windows systems.
The docker-compose is included in Docker for Mac and Docker for Windows installer.
So there is no need for other installation processes for this.

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

No branches or pull requests

1 participant