Portabase AgentDatabases
Redis
Configuration for Redis.
The agent will use redis-cli to perform backups.
Configuration with Auth
{
"name": "Redis Database Auth",
"type": "redis",
"host": "db-redis-auth",
"port": 6379,
"username": "username",
"password": "password",
"generated_id": "..."
}Configuration without Authentication
{
"name": "Redis Database",
"type": "redis",
"host": "db-redis",
"port": 6379,
"generated_id": "..."
}Docker Compose Example
services:
db-redis:
image: redis:latest
container_name: db-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: [ "redis-server", "--appendonly", "yes" ]
networks:
- portabase
db-redis-auth:
image: redis:latest
container_name: db-redis-auth
ports:
- "6380:6379"
volumes:
- redis-data-auth:/data
environment:
- REDIS_PASSWORD=<your-password>
command: [ "redis-server", "--requirepass", "<your-password>", "--appendonly", "yes" ]
networks:
- portabase
agent:
image: portabase/agent:latest
# ... agent configuration ...
networks:
- portabase
networks:
portabase:
external: true
volumes:
redis-data-auth:
redis-data:Important: Localhost and Docker
If you use localhost as the host (because the agent is on the host machine and not in Docker, or via host-gateway), ensure your database is listening on all interfaces (0.0.0.0) or is accessible from the agent.
Try this: "host": "host.docker.internal" (replace host in config.json, toml) or "host": "db-redis" (if using Docker Compose).
Last updated on