-
Notifications
You must be signed in to change notification settings - Fork 44
Add HTTPS mode to setup wizard #957
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,17 @@ | ||
| services: | ||
| sdp-frontend: | ||
| extends: | ||
| file: docker-compose-frontend.yml | ||
| service: sdp-frontend | ||
philipliu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| sdp-frontend-proxy: | ||
| image: nginx:1.25-alpine | ||
| depends_on: | ||
| - sdp-frontend | ||
| ports: | ||
| - "3443:443" | ||
| extra_hosts: | ||
| - "host.docker.internal:host-gateway" | ||
| volumes: | ||
| - ./nginx-https.conf:/etc/nginx/conf.d/default.conf:ro | ||
| - ./certs:/etc/nginx/ssl:ro | ||
| - ./env-config-${NETWORK_TYPE:-testnet}.js:/etc/nginx/html-env/env-config.js:ro | ||
This file contains hidden or 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,62 @@ | ||
| map $http_upgrade $connection_upgrade { | ||
| default upgrade; | ||
| '' close; | ||
| } | ||
|
|
||
| upstream frontend_dev { | ||
| server host.docker.internal:3000; | ||
| keepalive 16; | ||
| } | ||
|
|
||
| upstream frontend_static { | ||
| server sdp-frontend:80; | ||
| keepalive 16; | ||
| } | ||
|
|
||
| server { | ||
| listen 80; | ||
| server_name localhost *.stellar.local; | ||
| return 301 https://$host$request_uri; | ||
| } | ||
|
|
||
| server { | ||
| listen 443 ssl; | ||
| server_name localhost *.stellar.local; | ||
|
|
||
| ssl_certificate /etc/nginx/ssl/stellar.local.pem; | ||
| ssl_certificate_key /etc/nginx/ssl/stellar.local-key.pem; | ||
| ssl_protocols TLSv1.2 TLSv1.3; | ||
|
|
||
| gzip on; | ||
| gzip_types application/javascript application/rss+xml application/x-font-opentype application/x-font-truetype application/x-font-ttf application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon text/css text/javascript text/plain text/xml; | ||
|
|
||
| location = /settings/env-config.js { | ||
| alias /etc/nginx/html-env/env-config.js; | ||
| add_header Cache-Control "no-store"; | ||
| } | ||
|
|
||
| location / { | ||
| proxy_http_version 1.1; | ||
| 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 https; | ||
| proxy_set_header Upgrade $http_upgrade; | ||
| proxy_set_header Connection $connection_upgrade; | ||
| proxy_cache_bypass $http_upgrade; | ||
| proxy_read_timeout 300s; | ||
| proxy_connect_timeout 5s; | ||
| proxy_pass http://frontend_dev; | ||
| proxy_intercept_errors on; | ||
| error_page 502 503 504 = @frontend_static; | ||
| } | ||
|
|
||
| location @frontend_static { | ||
| proxy_http_version 1.1; | ||
| 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 https; | ||
| proxy_pass http://frontend_static; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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
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.
Great instructions!