-
Notifications
You must be signed in to change notification settings - Fork 125
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
feat: simplify deployment with nginx #36
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Alexander Onnikov <[email protected]>
@aonnikov you beat me to it, most of the fixes you just pushed I have laying unpushed on my machine 😅 |
Fair enough, added you as a co-author (know, it is dirty but better than nothing). Much appreciate your contribution! |
Signed-off-by: veryCrunchy <[email protected]>
Network isn't needed as only the nginx port is exposed
@aonnikov there are a lot of duplicate env variables set in the compose.yml, |
Yeah, all of them are used, but some of them are not mandatory and can be omitted. |
This allows for easily copy and pasting the commands
Signed-off-by: veryCrunchy <[email protected]>
sed -i "s|server_name .*;|server_name ${HOST_ADDRESS};|" ./nginx.conf | ||
sed -i "s|proxy_pass .*;|proxy_pass http://${HTTP_BIND:-127.0.0.1}:${HTTP_PORT};|" ./nginx.conf | ||
|
||
# Update listen directive to either port 80 or 443, while preserving IP address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of commands below fail with errors, here is errors log:
Generating nginx.conf...
nginx.conf not found, creating from template.
sed: 1: "./nginx.conf": invalid command code .
sed: 1: "./nginx.conf": invalid command code .
sed: 1: "s|(listen )(.*:)?[0-9]+ ...": \1 not defined in the RE
sed: 1: "s|(listen )(.*:)?([0-9] ...": \1 not defined in the RE
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
Enabling SSL; removing HTTP to HTTPS redirect block...
Do you want to run 'nginx -s reload' now to load your updated Huly config? (Y/n): n
You can run 'nginx -s reload' later to load your updated Huly config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does my fix work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sed errors are gone, but grep error is still there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overlooked that one, grep should be fixed as well now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not working:
grep: repetition-operator operand invalid
I have an impression that this configuration becomes too complex. We have no goal to provide production ready solution, the original intention was to provide a sample configuration for local deployment. I propose to simplify nginx config and script, but provide guidance in README what to change in case of more advance requirements. |
@aonnikov This "complex" configuration simplifies self-hosting Huly for users and is not aimed to be production ready. |
This is likely due to incompatible or corrupted data. Try deleting the persistent docker volumes or starting fresh by changing the |
@Sharlyll are you trying to self host Huly using the branch of this PR or with the current main branch? |
Yes, I am self hosting using the main branch and instructions from here: https://github.com/hcengineering/huly-selfhost. |
@Sharlyll This PR is meant to fix all the issues with the main branch. Please try the nginx branch on git clone -b nginx https://github.com/veryCrunchy/huly-selfhost.git |
Hi Thanks in advance |
@Sharlyll follow these steps: https://github.com/veryCrunchy/huly-selfhost/tree/nginx |
I still the same issue with account service not available. My configuration:
|
Thanks for your response.
Huly should be up |
I tested this out on my ubuntu instance and it works. I had to stop my nginx service on the server and leave the work to the docker nginx container. |
This PR fixes:
Resolves #2
Resolves #3
Resolves #6
Resolves #11
Resolves #15
Resolves #21
Resolves #27
Note
love with livekit will be implemented in a separate pr after this one has been merged