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

Routing traffic to container #141

Closed
Fransie-dev opened this issue Mar 12, 2024 · 2 comments
Closed

Routing traffic to container #141

Fransie-dev opened this issue Mar 12, 2024 · 2 comments

Comments

@Fransie-dev
Copy link

Fransie-dev commented Mar 12, 2024

Hi!

I'm quite inexperienced working with DNS, and I am trying to figure out what is the correct way to host this container on a registered domain? I'm assuming I can host the container on a remote server and route the domain name to the IP of the remote server. I'm running into some issues with this approach, and I just wanted to check if I'm missing something? Also, what is the point of the base url env variable then?

@NathanVaughn
Copy link
Owner

There's a lot of options. What I would recommend is to run the container, and not expose the port to the public internet. Then, I would run a reverse proxy of some kind on the same server, and let this handle incoming connections. Your reverse proxy should handle adding encryption and renewing certificates with something like Let's Encrypt. Your reverse proxy would be what actually is listening on port 443 on the public interface of your server.

Diagram:
image

I personally like to use Traefik as it integrates nicely with Docker and automatically manages Let's Encrypt certificates.

As for the BASE_URL environment variable, this is used to let Webtrees know how to build links. In the example above, it may think it's accessible at http://localhost:8080, but it reality its links should be pointing at https://webtrees.example.com .

@Fransie-dev
Copy link
Author

Thank you so much for the thorough answer! Much appreciated.

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