-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ssl everywhere ssl option in wis2box-ctl env-variables to share key and cert location initial docs mosquitto and nginx ssl/nossl http://localhost:8999 to http://localhost * remove placeholder.crt * add ports in docker-compose.ssl.yml * remove -nossl suffix for nossl files * Update wis2box-ctl.py * Update public-services-setup.rst --------- Co-authored-by: Tom Kralidis <[email protected]>
- Loading branch information
1 parent
a7e0f65
commit 2878a39
Showing
16 changed files
with
185 additions
and
30 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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
services: | ||
web-proxy: | ||
ports: | ||
- 8999:80 | ||
- 80:80 | ||
|
||
wis2box-ui: | ||
ports: | ||
|
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,15 @@ | ||
services: | ||
web-proxy: | ||
ports: | ||
- 443:443 | ||
volumes: | ||
- ./nginx/nginx-ssl.conf:/etc/nginx/conf.d/ssl.conf | ||
- ${WIS2BOX_SSL_KEY}:/etc/nginx/certs/wis2box.key:ro | ||
- ${WIS2BOX_SSL_CERT}:/etc/nginx/certs/wis2box.crt:ro | ||
|
||
mosquitto: | ||
ports: | ||
- 8883:8883 | ||
volumes: | ||
- ${WIS2BOX_SSL_KEY}:/tmp/wis2box.key:ro | ||
- ${WIS2BOX_SSL_CERT}:/tmp/wis2box.crt:ro |
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
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
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,81 @@ | ||
server { | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
|
||
ssl_certificate /etc/nginx/certs/wis2box.crt; | ||
ssl_certificate_key /etc/nginx/certs/wis2box.key; | ||
|
||
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-Host $server_name; | ||
|
||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; | ||
add_header 'WWW-Authenticate' 'Bearer' 'always'; | ||
|
||
#proxy_read_timeout 300s; | ||
#proxy_connect_timeout 75s; | ||
|
||
sendfile on; | ||
gzip on; | ||
gzip_types application/json application/geo+json text/css application/javscript text/plain; | ||
gzip_proxied no-cache no-store private expired auth; | ||
gzip_min_length 1000; | ||
|
||
# Proxy requests to the bucket "wis2box-incoming" to MinIO container running on port 9000 | ||
# NOTE do not use rewrite, it crashes the upload | ||
location /wis2box-incoming/ { | ||
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; | ||
proxy_set_header Host $http_host; | ||
|
||
proxy_connect_timeout 300; | ||
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1 | ||
proxy_http_version 1.1; | ||
proxy_set_header Connection ""; | ||
chunked_transfer_encoding off; | ||
|
||
proxy_pass http://minio:9000; | ||
} | ||
location /data { | ||
# FIXME: derive alias from environment variables | ||
auth_request /auth; | ||
auth_request_set $auth_status $upstream_status; | ||
|
||
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; | ||
proxy_set_header Host $http_host; | ||
|
||
proxy_connect_timeout 300; | ||
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1 | ||
proxy_http_version 1.1; | ||
proxy_set_header Connection ""; | ||
chunked_transfer_encoding off; | ||
|
||
rewrite ^/data(/.*)$ /wis2box-public$1 break; | ||
proxy_pass http://minio:9000; | ||
} | ||
location /oapi { | ||
auth_request /auth; | ||
auth_request_set $auth_status $upstream_status; | ||
proxy_pass http://wis2box-api:80; | ||
} | ||
location / { | ||
proxy_pass http://wis2box-ui:80; | ||
} | ||
|
||
location /auth { | ||
internal; | ||
proxy_pass http://wis2box-auth:80/authorize; | ||
proxy_pass_request_body off; | ||
proxy_set_header Content-Length ""; | ||
proxy_set_header X-Original-URI $request_uri; | ||
proxy_set_header Authorization $http_authorization; | ||
proxy_pass_header Authorization; | ||
} | ||
} | ||
|
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
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
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,24 @@ | ||
persistence true | ||
persistence_location /mosquitto/data/ | ||
log_dest file /mosquitto/log/mosquitto.log | ||
log_dest stdout | ||
log_timestamp_format %Y-%m-%dT%H:%M:%S | ||
password_file /mosquitto/config/password.txt | ||
max_queued_messages _WIS2BOX_BROKER_QUEUE_MAX | ||
|
||
# ACLs | ||
acl_file /mosquitto/config/acl.conf | ||
|
||
## MQTT Listener | ||
listener 1883 | ||
protocol mqtt | ||
|
||
## WebSockets Listener | ||
listener 8884 | ||
protocol websockets | ||
|
||
## MQTTs | ||
listener 8883 | ||
certfile /mosquitto/certs/wis2box.crt | ||
keyfile /mosquitto/certs/wis2box.key | ||
|
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ protocol mqtt | |
## WebSockets Listener | ||
listener 8884 | ||
protocol websockets | ||
|
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