Last active
July 23, 2019 14:25
-
-
Save berkant/aa8d977d2b7f17b091af6d23fad36927 to your computer and use it in GitHub Desktop.
Revisions
-
berkant revised this gist
Jul 23, 2019 . 1 changed file with 1 addition and 0 deletions.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 charactersOriginal file line number Diff line number Diff line change @@ -61,6 +61,7 @@ http { # between versions and may include improvements to the configuration. include nginx/sourcegraph_server.conf; # Continue only if the host has src-mgmt subdomain. server_name src-mgmt.*; listen 7080; -
berkant revised this gist
Jul 23, 2019 . 1 changed file with 16 additions and 0 deletions.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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ FROM sourcegraph/server:3.6.0 # Reset original entrypoint from base image. ENTRYPOINT [] # Grab tweaked nginx.conf. # See https://gist.github.com/0xbkt/aa8d977d2b7f17b091af6d23fad36927. ADD https://gist.github.com/0xbkt/aa8d977d2b7f17b091af6d23fad36927/raw/nginx.conf /etc/sourcegraph/ # Disable self-signed SSL of Management Console. ENV UNSAFE_NO_HTTPS=true # Make Sourcegraph's frontend bind to the PORT given by Heroku at runtime. CMD export SRC_NGINX_HTTP_ADDR="0.0.0.0:$PORT"; \ sed -i "s/7080/$PORT/g" /etc/sourcegraph/nginx.conf; \ tini -s -- /usr/local/bin/server; -
berkant revised this gist
Jul 23, 2019 . 1 changed file with 18 additions and 2 deletions.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 charactersOriginal file line number Diff line number Diff line change @@ -35,6 +35,7 @@ http { server 127.0.0.1:2633; } # Sourcegraph Frontend server { # Do not remove. The contents of sourcegraph_server.conf can change # between versions and may include improvements to the configuration. @@ -52,12 +53,27 @@ http { proxy_buffers 8 256k; proxy_busy_buffers_size 256k; } } # Management Console server { # Do not remove. The contents of sourcegraph_server.conf can change # between versions and may include improvements to the configuration. include nginx/sourcegraph_server.conf; server_name src-mgmt.*; listen 7080; location / { proxy_pass http://management_console; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # SAML redirect response headers are sometimes large proxy_buffer_size 128k; proxy_buffers 8 256k; proxy_busy_buffers_size 256k; } } } -
berkant revised this gist
Jul 23, 2019 . 1 changed file with 1 addition and 1 deletion.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 charactersOriginal file line number Diff line number Diff line change @@ -54,7 +54,7 @@ http { } location /mgmt { proxy_pass http://management_console/; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; -
berkant revised this gist
Jul 23, 2019 . 1 changed file with 11 additions and 0 deletions.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 charactersOriginal file line number Diff line number Diff line change @@ -30,6 +30,10 @@ http { # between versions and may include improvements to the configuration. include nginx/sourcegraph_backend.conf; } upstream management_console { server 127.0.0.1:2633; } server { # Do not remove. The contents of sourcegraph_server.conf can change @@ -48,5 +52,12 @@ http { proxy_buffers 8 256k; proxy_busy_buffers_size 256k; } location /mgmt { proxy_pass http://management_console; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } } -
berkant created this gist
Jul 23, 2019 .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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ # This config was generated by Sourcegraph. # You can adjust the configuration to add additional TLS or HTTP features. # Read more at https://docs.sourcegraph.com/admin/nginx error_log stderr; pid /var/run/nginx.pid; # Do not remove. The contents of sourcegraph_main.conf can change between # versions and may include improvements to the configuration. include nginx/sourcegraph_main.conf; events { } http { server_tokens off; # SAML redirect response headers are sometimes large proxy_buffer_size 128k; proxy_buffers 8 256k; proxy_busy_buffers_size 256k; # Do not remove. The contents of sourcegraph_http.conf can change between # versions and may include improvements to the configuration. include nginx/sourcegraph_http.conf; access_log off; upstream backend { # Do not remove. The contents of sourcegraph_backend.conf can change # between versions and may include improvements to the configuration. include nginx/sourcegraph_backend.conf; } server { # Do not remove. The contents of sourcegraph_server.conf can change # between versions and may include improvements to the configuration. include nginx/sourcegraph_server.conf; listen 7080; location / { proxy_pass http://backend; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # SAML redirect response headers are sometimes large proxy_buffer_size 128k; proxy_buffers 8 256k; proxy_busy_buffers_size 256k; } } }