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

Docker & Docker Swarm configs are strange and don't work #48

Open
binakot opened this issue Apr 10, 2019 · 3 comments
Open

Docker & Docker Swarm configs are strange and don't work #48

binakot opened this issue Apr 10, 2019 · 3 comments

Comments

@binakot
Copy link

binakot commented Apr 10, 2019

Good day. It's really cool project with great features, but...

I see some configurations for Docker & Docker Swarm environments, I just tried to run it on my Win10 or MacOS. It doesn't work. I guess you have specific network setup on your dev machine.

  • First of all, why is there strong IP hard-coding: ipv4_address: 172.19.0.6 and so on?

  • For what you are set constraints: [node.role == manager]?

  • Main application is crashed with error on /opt/monaba/Monaba /var/settings.yml and message that settings.yml cannot be parsed as valid yaml file. Btw I checked this file in yaml online validator - it was valid. Also I checked the file inside a docker container, file was in the path /var/settings.yml and contains all configs.

  • Why you set host aliases for containers: search.in and so on? I didn't find the usage of it.

  • What is the reason to use exactly this subnet: subnet: 172.19.0.0/16?

Please, help! :octocat:

@ahushh
Copy link
Owner

ahushh commented Apr 11, 2019

Hi! Thanks, glad to hear you like it.

1, 5. I have to hard-code network range because I need a way to determine whether a http request is received from the torgate service. So I just check if IP is 172.19.0.4. It's a dumb and clumsy solution, but I don't know how to do it in a better manner.
2. I've been exploring how Docker Swarm work and how to scale Monaba. Nothing really meaningful here.
3. I used to get this error too, seems that yesod cannot locate settings.yml file. It should have been copied to the current directory by running ./build script. Then it's being attached to a docker container via binding to /var/settings.yml. Make sure you're starting docker-compose from Monaba directory and have the settings file there. Post settings.yml here if it won't work for you.
4. It's for developing purpose, if I'm not mistaken.

@binakot
Copy link
Author

binakot commented Apr 11, 2019

@ahushh Thanks for feedback.

1,5. I think you should to do next: rename docker-compose.yml to docker-compose.tor.yml and add one more file with name docker-compose.yml withour ip hard-code ips and other specific settings. As for me It is the best and the most flexible solution here.

2. I see.

3. I will try one more time. And If I will got same error I will provide more details.

4. Idk, docker engine create overlay networks itself. I think you use it because of IP hard coding. For my case without TOR I can just remove it.

@binakot
Copy link
Author

binakot commented Apr 12, 2019

This is my working docker-compose and settings. https://gist.github.com/binakot/d86d4107c5d46e2eae79339aeed4fac0

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

2 participants