@evolu/relay 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,16 +17,25 @@ npx @evolu/relay
|
|
|
17
17
|
## Run with Docker
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
docker run --
|
|
20
|
+
docker run -d --restart unless-stopped -p 4000:4000 -v evolu-relay-data:/app/data docker.io/evoluhq/relay:4
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
For Docker Compose, download the repository's
|
|
24
|
-
[`docker-compose.yml`](https://github.com/evoluhq/evolu/blob/main/apps/relay/docker-compose.yml)
|
|
25
|
-
and run `docker compose up` from the
|
|
24
|
+
[`docker-compose.yml`](https://github.com/evoluhq/evolu/blob/main/apps/relay/docker-compose.yml),
|
|
25
|
+
which sets the same restart policy, and run `docker compose up` from the
|
|
26
|
+
directory containing that file.
|
|
26
27
|
|
|
27
28
|
Tags follow the npm package version: `4.0.0`, `4.0`, `4`, and `latest` for the
|
|
28
29
|
newest stable release. Prerelease versions only get their full version tag.
|
|
29
30
|
|
|
31
|
+
## Restarts
|
|
32
|
+
|
|
33
|
+
A defect, a bug the relay cannot recover from, makes it close its connections
|
|
34
|
+
and exit with code 1, because it cannot prove that its shared state is still
|
|
35
|
+
intact. Run it under something that restarts it: the Docker restart policy
|
|
36
|
+
above, the Compose file, or a service manager such as systemd for the npm
|
|
37
|
+
package. Clients reconnect and sync what they missed.
|
|
38
|
+
|
|
30
39
|
## Configure
|
|
31
40
|
|
|
32
41
|
The relay reads `PORT` and Relay-specific `EVOLU_RELAY_*` environment variables:
|
|
@@ -55,7 +64,7 @@ The Docker health check follows `PORT`. Use a fixed, nonzero port in Docker;
|
|
|
55
64
|
The image exposes port 4000, so map a custom port explicitly:
|
|
56
65
|
|
|
57
66
|
```bash
|
|
58
|
-
docker run --
|
|
67
|
+
docker run -d --restart unless-stopped -e PORT=4001 -p 4001:4001 -v evolu-relay-data:/app/data docker.io/evoluhq/relay:4
|
|
59
68
|
```
|
|
60
69
|
|
|
61
70
|
To add authorization or integrate the relay into your own server, use the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evolu/relay",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Evolu Relay server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"evolu",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"README.md"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@evolu/common": "8.
|
|
30
|
+
"@evolu/common": "8.13.0",
|
|
31
31
|
"@evolu/nodejs": "4.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|