Skip to content

Update the docker-compose #130

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

Closed
wants to merge 1 commit into from
Closed

Update the docker-compose #130

wants to merge 1 commit into from

Conversation

skywalkerisnull
Copy link

Added the ports to be open on the jc21/mariadb-aria.

I was getting a connection error of:
app_1 | [5/3/2019] [2:04:54 AM] [Global ] › ✖ error connect ECONNREFUSED 192.168.2.109:3306

I was able to resolve this by adding in the ports that need to be opened in the docker-compose script.

Added the ports to be open on the jc21/mariadb-aria
@jc21
Copy link
Member

jc21 commented May 3, 2019

Technically this change to the example won't do anything to solve your problem. The example you're editing starts the containers in docker bridge mode and you're using it in host mode presumably, for the nginx-proxy-manager container but not the mariadb-aria container.

@jc21
Copy link
Member

jc21 commented May 3, 2019

Docker Image for build 1 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-130-amd64

@skywalkerisnull
Copy link
Author

Yes you are correct, this machine has docker using host networks.

Just did a few tests to get it working without the explict port number in the docker compose file, I needed to change the host from local host IP to 'db' like what you have in the docs/example/config.json

@brusezot
Copy link

i don't understand why ? jc21 can you explain with more detail your comment :

"Technically this change to the example won't do anything to solve your problem. The example you're editing starts the containers in docker bridge mode and you're using it in host mode presumably, for the nginx-proxy-manager container but not the mariadb-aria container."

i would like resolve this problem please ;)

thanks you for your job

@jc21
Copy link
Member

jc21 commented Jan 19, 2020

In the docker-compose.yml file that has been changed in this PR, there are 2 services: app and db.

There is no mention of network_mode on any service which means that the services are started using bridge mode. Bridge mode means that the services can talk to each other on "exposed" ports inside their own little NAT. In the case of these services, 3306 is exposed on the db service; this is done with the Dockerfile already, and is not required in the docker-compose configuration.

Your proposed change only exposes the db 3306 port to the host network, which the app service is not using, so your change is pointless in helping you connect the app to the db.

So my comment above was assuming either you strictly specified an IP of 192.168.2.109 as the database server in the NginxProxyManager configuration file (instead of db as the hostname) and I'm guessing 192.168.2.109 is the IP of your Docker Host; or you changed the docker-compose file to have network_mode: host on the app service but not the db service.

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.

3 participants