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

Sugestion to fix custom port Hedgedoc problems #117

Open
Anthares101 opened this issue Nov 30, 2021 · 0 comments
Open

Sugestion to fix custom port Hedgedoc problems #117

Anthares101 opened this issue Nov 30, 2021 · 0 comments

Comments

@Anthares101
Copy link

Anthares101 commented Nov 30, 2021

The problem

In my use case I'm not able to use the port 443 for https so I'm forced to have a url like: <domain>:<port>. In theory this shouldn't be a problem but looks like Hedgedoc doesn't manage well a port in the CMD_DOMAIN variable and ends up generating wrong URLs for some features (In my case the URLs were like: <domain>:<port>:<port>).

This problem could be solved by doing this:

  • Changing the Hedgedoc port to the same custom port used to serve the application with CMD_PORT
  • Use only the domain as the CMD_DOMAIN value (Without the port!)
  • Enable the CMD_URL_ADDPORT option to make Hedgedoc add the port to the URL

The thing is that the Nginx used with the front docker image has the port 3000 for Hedgedoc hard coded, so that changes will produce a failure trying to open a task for example.

Sugestion

A solution for this could be to parameterize the Hedgedoc port used in the Nginx configuration to take the CMD_PORT value. envsubst can be used to generate the Nginx configuration dynamically before nginx starts.

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