You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, if you define a `redis-persistent` database as follows:
417
+
418
+
```yaml {configFile="services"}
419
+
postgresql:
420
+
type: "redis-persistent:16"
421
+
disk: 2048
422
+
configuration:
423
+
databases:
424
+
- main
425
+
- legacy
426
+
endpoints:
427
+
admin:
428
+
privileges:
429
+
main: admin
430
+
legacy: admin
431
+
reporter:
432
+
default_database: main
433
+
privileges:
434
+
main: ro
435
+
```
436
+
437
+
To create a replica of the `redis-persistent` database and allow your app to connect to it
438
+
through the `admin` endpoint with admin permissions,
439
+
use the following configuration:
440
+
441
+
```yaml {configFile="app"}
442
+
relationships:
443
+
redis-persistent:
444
+
service: redis-persistent
445
+
endpoint: admin-replica
446
+
```
447
+
448
+
To create a replica of the `redis-persistent` database and allow your app to connect to it
449
+
through the `reporter` endpoint with read-only permissions instead,
450
+
use the following configuration:
451
+
452
+
```yaml {configFile="app"}
453
+
relationships:
454
+
redis-persistent:
455
+
service: redis-persistent
456
+
endpoint: reporter-replica
457
+
```
458
+
396
459
## Relationship reference
397
460
398
461
Example information available through the [`{{% vendor/prefix %}}_RELATIONSHIPS` environment variable](/development/variables/use-variables.md#use-provided-variables)
{{ $content := `This feature is available on Grid HA (High Availability) and {{% names/dedicated-gen-3 %}} projects. For more information, [contact Sales](https://platform.sh/contact/).`}}
0 commit comments