-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add nginx forwarding #133
Draft
bendhouseart
wants to merge
11
commits into
brainlife:master
Choose a base branch
from
bendhouseart:add-nginx-forwarding
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add nginx forwarding #133
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
cc76413
updating docker compose to use nginx for forwarding
bendhouseart 1f26bd8
added nginx config and updated docker file works on mac
bendhouseart 0573c33
added folder for certs
bendhouseart 516a8d8
had to bodge npm installs, husky, and vite to get healthy containers …
bendhouseart 7b941a6
Merge branch 'add-nginx-forwarding' of github.com:bendhouseart/ezbids…
bendhouseart b685a18
updated docker compose, health checks all pass. CORS still an issue
bendhouseart 2fa88f2
add nginx config
bendhouseart 13989f7
incremental progress is progress
bendhouseart 35770d6
redirects all work when running locally
bendhouseart 1056b85
Merge branch 'add-nginx-forwarding' of github.com:bendhouseart/ezbids…
bendhouseart 8b1b26c
ssl works with the addition of a cert, key, and the password for it
bendhouseart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# insert your host name here, it should match the name/domain of your ssl certificate | ||
SERVER_NAME=localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,13 @@ export BRAINLIFE_AUTHENTICATION | |
|
||
git submodule update --init --recursive | ||
|
||
(cd api && npm install -g [email protected]) | ||
(cd ui && npm install -g [email protected]) | ||
(cd api && npm install) | ||
(cd ui && npm install) | ||
|
||
mkdir -p /tmp/upload | ||
mkdir -p /tmp/workdir | ||
|
||
npm run prepare-husky | ||
#npm run prepare-husky | ||
|
||
./generate_keys.sh | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
# use the enviroment variable SERVER_NAME to set the server_name | ||
server_name $SERVER_NAME; | ||
client_max_body_size 1200M; | ||
|
||
#access_log /var/log/nginx/host.access.log main; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
location /ezbids { | ||
proxy_pass http://ui:3000; | ||
} | ||
|
||
location /api/ { | ||
proxy_pass http://api:8082/; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
error_page 404 /404.html; | ||
|
||
# redirect server error pages to the static page /50x.html | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
server { | ||
listen 443 ssl; | ||
ssl_certificate /etc/nginx/conf.d/ssl/sslcert.cert; | ||
ssl_certificate_key /etc/nginx/conf.d/ssl/sslcert.key; | ||
ssl_password_file /etc/nginx/conf.d/ssl/sslpassword; | ||
server_name $SERVER_NAME; | ||
client_max_body_size 1200M; | ||
|
||
#access_log /var/log/nginx/host.access.log main; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
location /ezbids { | ||
proxy_pass http://ui:3000; | ||
} | ||
|
||
location /api/ { | ||
proxy_pass http://api:8082/; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
error_page 404 /404.html; | ||
|
||
# redirect server error pages to the static page /50x.html | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@dlevitas @anibalsolon Mac is such a nightmare, I had to mess with this stuff and disable husky to get this running on my x86 machine (old intel mac pro). As I mention in the PR description this should probably be undone, will do so once I've got https working properly.