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

#need help : 2 servers 1 public ip #85

Closed
tionebDotsamapha opened this issue Aug 14, 2018 · 9 comments
Closed

#need help : 2 servers 1 public ip #85

tionebDotsamapha opened this issue Aug 14, 2018 · 9 comments

Comments

@tionebDotsamapha
Copy link

tionebDotsamapha commented Aug 14, 2018

Hi all,

I have 2 docker servers on the same physical network for only one public ip.

I use the first server on the port 80 and 443 with docker-compose-letsencrypt-nginx-proxy-companion and I would thanks people who's participating at this project.

But now I want to use the second with the proxy companion. I set a another docker-compose on on the second on 8080 and 4343 ports

But that not work.
I've an error on the creation of the certificat.
Let's Encrypt need the domain an http connection.

Anyone can give me how can I set this?

Thank you?

@evertramos
Copy link
Owner

Hello @ben7244,

Thanks for your message.

The have it running you must use port 80 and 443 as of requested by the @jwilder containers, we use...

But if you have two different servers, even if it shares the same external ip, the local ip is different you would use port 80 and 443 the both server... if there is two different servers.

Let me know if I could be of any help.

@tionebDotsamapha
Copy link
Author

Thank you @evertramos!
Yes, there is two differents physicals servers

if I understood. I need proxy companion on only one server. So I can use my actual proxy to redirect on the second server.
In this case I don't see what I must set to redirect with letsencrypt certs.
Can you give me the way to follow?

@evertramos
Copy link
Owner

@ben7244, sorry...

I mean you should have proxy on both server, listening on port 80 and 443 on both server. So, it will be two environments.

Do you want to load balance?

You could try to use Kubernetes or Ingress to do it so, might want to check swarm as well, but with this proxy might be little hard to do load balancing on two different server...

I am working on a new proxy but it will take some time to put it to production.

Hope you get through this..

@tionebDotsamapha
Copy link
Author

@evertramos, thank you!
I close the discution because I just see the issue #63 which is a similar question. although I don't understand why @xgenvn talks about swarm in the title.
His graph explain really that I need but I don't know why I must do :
38718244-454bb7be-3f16-11e8-94e2-116920eb281f

I continue to search, all help is welcome!

@evertramos
Copy link
Owner

You could do that with an extra nginx to administrate your services as of this sample:

https://github.com/evertramos/nignx-behind-proxy

Let me know if it was of any help.

@tionebDotsamapha
Copy link
Author

Perfect!
After long hours I win!

Thank you for all your advices!

Can you tell us more on your new proxy or that's a surprise?

@evertramos
Copy link
Owner

evertramos commented Aug 16, 2018

I am just trying to automate everything for a devop, creating a script to backup it containers data and wordpress, restore in another server if needed, and also simplify the ssl certificates for same domain with new Let's Encrypt option for wildcard which we do not have today... I am styding traefik, ingress. and it will probably be the best solution for it.

If you use wordpress you could follow up and give some ideas on:

https://github.com/evertramos/docker-wordpress-backup

Still in development ok?

@tionebDotsamapha
Copy link
Author

Thanks for your back.
That's will nice!

I don't use WordPress but I will follow your project.
I store our own laravel cms for easy websites creation at use of professionals editors without IT knowledge.
There will be common function at my environment.

Thanks for your help! Bye

@evertramos
Copy link
Owner

I do have a couple apps in Laravel as well but still not mature enough for the CI... using GitLab for the moment, but will share the code as well, soon.

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