Skip to content

Commit

Permalink
docs: improved docs for managed version and NGINX (#791)
Browse files Browse the repository at this point in the history
* docs: improved docs for managed version

* docs: create a page for NGINX

* fix
  • Loading branch information
dunglas committed Aug 1, 2023
1 parent 96b6ee4 commit b45a553
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 30 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -2,7 +2,7 @@

*Protocol and Reference Implementation*

Mercure is a protocol allowing to push data updates to web browsers and other HTTP clients in a convenient, fast, reliable and battery-efficient way.
Mercure is a protocol for pushing data updates to web browsers and other HTTP clients in a convenient, fast, reliable, and battery-efficient way.
It is especially useful to publish async and real-time updates of resources served through web APIs, to reactive web and mobile apps.

[![Awesome](https://awesome.re/badge.svg)](docs/ecosystem/awesome.md)
Expand All @@ -18,10 +18,10 @@ It is especially useful to publish async and real-time updates of resources serv
* [Full documentation](https://mercure.rocks/docs)
* [Demo](https://demo.mercure.rocks/)

The protocol has been published as [an Internet Draft](https://datatracker.ietf.org/doc/draft-dunglas-mercure/) that [is maintained in this repository](https://mercure.rocks/spec).
[The protocol](https://mercure.rocks/spec) is maintained in this repository and is also available as [an Internet Draft](https://datatracker.ietf.org/doc/draft-dunglas-mercure/).

A reference, production-grade, implementation of [**a Mercure hub**](https://mercure.rocks/docs/hub/install) (the server) is also available in this repository.
It's a free software (AGPL) written in Go. It is provided along with a library that can be used in any Go application to implement the Mercure protocol directly (without a hub) and an official Docker image.
It's free software (AGPL) written in Go. It is provided along with a library that can be used in any Go application to implement the Mercure protocol directly (without a hub) and [an official Docker image](https://hub.docker.com/r/dunglas/mercure).

In addition, a managed and high-scalability version of the Mercure.rocks hub is [available on Mercure.rocks](https://mercure.rocks/pricing).

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem/help.md
Expand Up @@ -2,7 +2,7 @@

## Managed and On-Premise Support

* For support requests related to the [managed](https://mercure.rocks/pricing) or the [on premise](https://mercure.rocks/docs/hub/cluster#purchasing) version of Mercure.rocks, send a mail to [contact@mercure.rocks](mailto:contact@mercure.rocks).
For support requests related to the [Cloud](../hub/cloud.md) or the [On Premise](../hub/cluster.md#purchasing) version of Mercure.rocks, send a mail to [contact@mercure.rocks](mailto:contact@mercure.rocks?subject=Support%20request).

## Community Support

Expand Down
5 changes: 5 additions & 0 deletions docs/hub/cloud.md
Expand Up @@ -55,3 +55,8 @@ If you need more requests, upgrade to a higher plan or [the On Premise version](
The [high availability hub](cluster.md) we use for the cloud service can also be hosted on your own infrastructure. When you use the [on-premise version](cluster.md#high-availability-on-premise-version), there are no limits other than the load that can be handled by your servers.

[Contact us for more information on the On Premise version](mailto:contact@mercure.rocks?subject=I%27m%20interested%20in%20Mercure%20on%20premise).

## Support

For support requests related to the Cloud version of Mercure.rocks, send a mail to [contact@mercure.rocks](mailto:contact@mercure.rocks?subject=Cloud%20support%20request).
Please include the ID of your hub in the message.
4 changes: 4 additions & 0 deletions docs/hub/cluster.md
Expand Up @@ -206,3 +206,7 @@ Contact us if you need help to use them.
### Updates

New releases of the High Availability Mercure.rocks Hub are automatically available available in the Amazon S3 bucket containing the binary and on the Docker registry.

## Support

For support requests related to the On Premise version of Mercure.rocks, send a mail to [contact@mercure.rocks](mailto:contact@mercure.rocks?subject=On%20Premise%20support%20request).
33 changes: 8 additions & 25 deletions docs/hub/cookbooks.md
Expand Up @@ -12,28 +12,11 @@ You may also be interested in spreading the load across several servers using [t

To reproduce the problem, we provide [a load test](load-test.md) that you can use to stress your infrastructure.

## Using NGINX as an HTTP/2 Reverse Proxy in Front of the Hub

[NGINX](https://www.nginx.com) is supported out of the box. Use the following proxy configuration:

```nginx
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /path/to/ssl/cert.crt;
ssl_certificate_key /path/to/ssl/cert.key;
location / {
proxy_pass http://url-of-your-mercure-hub;
proxy_read_timeout 24h;
proxy_http_version 1.1;
proxy_set_header Connection "";
## Be sure to set USE_FORWARDED_HEADERS=1 to allow the hub to use those headers ##
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```

## Using Mercure Behind a Reverse Proxy

Mercure hubs run perfectly well behind reverse proxies.
Here are some configuration for popular proxies:

* [NGINX](nginx.md)
* [Traefik](traefik.md)
3 changes: 2 additions & 1 deletion docs/hub/install.md
Expand Up @@ -2,7 +2,8 @@

## Managed and HA Versions

[Managed and High Availability versions of Mercure.rocks](https://mercure.rocks/pricing) are available, give them a try!
The easiest way to get started with Mercure is to subscribe to the [Cloud version](https://mercure.rocks/pricing).
Give it a try!

## Prebuilt Binary

Expand Down
25 changes: 25 additions & 0 deletions docs/hub/nginx.md
@@ -0,0 +1,25 @@
# Using NGINX as an HTTP/2 Reverse Proxy in Front of the Hub

[NGINX](https://www.nginx.com) is supported out of the box. Use the following proxy configuration:

```nginx
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /path/to/ssl/cert.crt;
ssl_certificate_key /path/to/ssl/cert.key;
location / {
proxy_pass http://url-of-your-mercure-hub;
proxy_read_timeout 24h;
proxy_http_version 1.1;
proxy_set_header Connection "";
## Be sure to set USE_FORWARDED_HEADERS=1 to allow the hub to use those headers ##
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```

0 comments on commit b45a553

Please sign in to comment.