This commit is contained in:
2024-04-19 13:37:37 +02:00
parent 92412f0e3f
commit 66ed9c24ab
583 changed files with 3821 additions and 3978 deletions

View File

@ -1,31 +1,43 @@
![AAAAA](./img/logo-AAAAA.png)
# AAAAA
![redis](./img/logo.png)
# Installation
# Redis
Redis is a versatile and fast data store that supports strings, hashes, lists, sets, streams, and more. It also offers programmability, extensibility, persistence, clustering, and Base-de-donn<6E>esgh availability features, as well as Redis Stack for modern data models and processing engines.
Pour utiliser AAAAA tout seul
```bash
docker compose up -d
```
# Management UI
Redis Commander is a web-based management tool for Redis. It is a simple and intuitive tool that allows you to interact with Redis, monitor key space, and execute commands.
Pour utiliser AAAAA avec Traefik
```bash
docker compose -f docker-compose-traefik.yml up -d
```
Navigate to http://localhost:8081 to access the Redis Commander UI.
Pour utiliser AAAAA avec Nginx
```bash
docker compose -f docker-compose-nginx.yml up -d
```
# Utilisation
## Accueil
![redis-commander](./img/ui.png)
# More info
- more information on the website [Tips-Of-Mine](https://www.tips-of-mine.fr/)
## Prerequisites
- Docker
- Docker Compose
## Running the Stack
### Standalone
Inside the `standalone` directory, run `docker-compose up` to start the connector.
### Port Configurations
- `6379` - Master Redis port
- `6380` - Slave Redis port
### Configuration
All the configurations are available in the `standalone/conf` directory.
- `redis.conf` - Master Redis configuration file
- `redis-replica.conf` - Replica Redis configuration file
- `redis-commander.json` - Redis Commander configuration file
### Data Persistence
- `standalone/data` - Master Redis data directory
- `standalone/data-replica` - Replica Redis data directory
# Buy me a coffe
<a href='https://ko-fi.com/R5R2KNI3N' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi4.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

View File

@ -0,0 +1,4 @@
data
data-replica
.conf

View File

@ -0,0 +1,18 @@
{
"connections": [
{
"label": "standalone",
"host": "redis",
"port": 6379,
"password": "password",
"dbIndex": 0
},
{
"label": "replica",
"host": "redis-replica",
"port": 6379,
"password": "password",
"dbIndex": 0
}
]
}

View File

@ -0,0 +1,30 @@
# All option are available at https://redis.io/docs/management/config-file/
# Bind to all interfaces
bind 0.0.0.0
# Specify the port for Redis to listen on
port 6379
# Enable slave mode
replicaof redis 6379
# Enable persistence
appendonly yes
# Set the path to the appendonly file
appendfilename "appendonly.aof"
# Set the path to the directory containing the appendonly file
dir /data-replica
# Set the path to the dump file
dbfilename "dump.rdb"
# Set the path to the directory containing the dump file
dir /data-replica
# Optional: Set a password for authentication
masterauth password
requirepass password

View File

@ -0,0 +1,29 @@
# All option are available at https://redis.io/docs/management/config-file/
# Bind to all interfaces
bind 0.0.0.0
# Specify the port for Redis to listen on
port 6379
# Enable master mode
# replica-serve-stale-data no
# replica-read-only yes
replication-mode master
# Enable persistence
appendonly yes
# Set the path to the appendonly file
appendfilename "appendonly.aof"
# Set the path to the directory containing the appendonly file
dir /data
# Set the path to the dump file
dbfilename "dump.rdb"
# Set the path to the directory containing the dump file
dir /data
# Optional: Set a password for authentication
requirepass password

View File

@ -0,0 +1,49 @@
version: '3.9'
services:
redis:
build:
context: ./docker
dockerfile: redis.Dockerfile
container_name: redis
ports:
- '6379:6379'
volumes:
- ./data:/data
- .conf/redis.conf:/usr/local/etc/redis/redis.conf
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
healthcheck:
test: redis-cli ping
start_period: 15s
interval: 5s
timeout: 10s
retries: 5
redis-replica:
build:
context: ./docker
dockerfile: redis.Dockerfile
container_name: redis-replica
ports:
- '6380:6379'
volumes:
- ./data-replica:/data
- .conf/redis-replica.conf:/usr/local/etc/redis/redis.conf
command: ["redis-server", "/usr/local/etc/redis/redis.conf", "--slaveof", "redis", "6379"]
healthcheck:
test: redis-cli ping
start_period: 15s
interval: 5s
timeout: 10s
retries: 5
redis-commander:
container_name: redis-commander
hostname: redis-commander
image: ghcr.io/joeferner/redis-commander:latest
restart: always
volumes:
- ./conf/redis-commander.json:/redis-commander/config/local-production.json
ports:
- "8081:8081"

View File

@ -0,0 +1 @@
FROM redis:latest