-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from lightrun-platform/lightrun-broker-to-layer-7
upd broker files to L7
- Loading branch information
Showing
5 changed files
with
74 additions
and
14 deletions.
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
Empty file.
Empty file.
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 |
---|---|---|
@@ -1,14 +1,66 @@ | ||
stream { | ||
log_format basic '$remote_addr [$time_local] ' | ||
'$protocol $status $bytes_sent $bytes_received ' | ||
'$session_time'; | ||
http { | ||
upstream lightrun { | ||
server ${LIGHTRUN_SERVER}:443; | ||
zone lightrun 64k; | ||
server ${LIGHTRUN_SERVER}:443 max_fails=0; | ||
keepalive 2; | ||
} | ||
|
||
server { | ||
access_log /dev/stdout basic; | ||
listen 443; | ||
proxy_pass lightrun; | ||
listen 8443 ssl; | ||
server_name _ ; | ||
ssl_certificate /etc/nginx/conf.d/certs/tls.crt; | ||
ssl_certificate_key /etc/nginx/conf.d/certs/tls.key; | ||
ssl_prefer_server_ciphers on; | ||
|
||
location / { | ||
client_body_buffer_size 512k; | ||
client_max_body_size 25m; | ||
|
||
|
||
proxy_connect_timeout 90s; | ||
proxy_send_timeout 90s; | ||
proxy_read_timeout 90s; | ||
|
||
proxy_buffering on; | ||
proxy_buffer_size 1m; | ||
proxy_buffers 4 1m; | ||
|
||
proxy_max_temp_file_size 1024m; | ||
|
||
proxy_request_buffering on; | ||
proxy_http_version 1.1; | ||
|
||
proxy_cookie_domain off; | ||
proxy_cookie_path off; | ||
|
||
proxy_pass https://lightrun; | ||
|
||
proxy_set_header Host ${LIGHTRUN_SERVER}; | ||
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; | ||
|
||
} | ||
|
||
location /socket { | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header Host ${LIGHTRUN_SERVER}; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|
||
# WebSocket support | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_pass https://lightrun; | ||
|
||
proxy_buffer_size 128k; | ||
proxy_buffers 4 256k; | ||
proxy_busy_buffers_size 256k; | ||
} | ||
|
||
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 |
---|---|---|
@@ -1,15 +1,18 @@ | ||
version: "3.3" | ||
services: | ||
nginx: | ||
image: lightruncom/lightrun-broker:latest.layer4 | ||
image: lightruncom/lightrun-broker:0.1.0.layer7 | ||
ports: | ||
- "443:443" | ||
- "443:8443" | ||
user: root # may be requred for permissions to certificates | ||
environment: | ||
LIGHTRUN_SERVER: <tenant>.client.lightrun.com | ||
volumes: | ||
- type: bind | ||
source: ./conf/certs/ | ||
target: /etc/nginx/conf.d/certs/ | ||
- type: bind | ||
source: ./conf/default.template | ||
target: /tmp/default.template | ||
restart: always | ||
dns: | ||
- 8.8.8.8 # Set here your public DNS for resolving original Lightrun endpoint | ||
- 8.8.8.8 |