feat: Redis compose
This commit is contained in:
34
redis/compose.yml
Normal file
34
redis/compose.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
services:
|
||||
redis-master:
|
||||
image: redis:8.2
|
||||
restart: never
|
||||
command: ["redis-server", "--loglevel", "verbose"]
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
|
||||
redis-replica:
|
||||
image: redis:8.2
|
||||
restart: never
|
||||
depends_on:
|
||||
- redis-master
|
||||
command: ["redis-server", "--replicaof", "redis-master", "6379", "--loglevel", "verbose"]
|
||||
ports:
|
||||
- "6380:6379"
|
||||
volumes:
|
||||
- redis_data_replica:/data
|
||||
|
||||
readis:
|
||||
image: hollodotme/readis:2.2
|
||||
restart: never
|
||||
depends_on:
|
||||
- redis-master
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./readis:/code/config:Z
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
redis_data_replica:
|
||||
6
redis/readis/app.php
Normal file
6
redis/readis/app.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'baseUrl' => 'http://localhost:8080/',
|
||||
];
|
||||
23
redis/readis/servers.php
Normal file
23
redis/readis/servers.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
[
|
||||
'name' => 'Redis Master',
|
||||
'host' => 'redis-master',
|
||||
'port' => 6379,
|
||||
'auth' => null,
|
||||
'timeout' => 2.5,
|
||||
'retryInterval' => 100,
|
||||
'databaseMap' => [],
|
||||
],
|
||||
[
|
||||
'name' => 'Redis Replicata',
|
||||
'host' => 'redis-replica',
|
||||
'port' => 6379,
|
||||
'auth' => null,
|
||||
'timeout' => 2.5,
|
||||
'retryInterval' => 100,
|
||||
'databaseMap' => [],
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user