Redis
Configuration for Redis.
Add this database from the dashboard
Since Dashboard 1.29.0 and Agent 1.19.0, you can add this database directly from the dashboard (Add database on the agent page), without editing any file. See Adding a Database. The settings described below also apply to the dashboard form.
The agent will use redis-cli to perform backups.
Configuration
When running portabase agent db add, select redis as the database type.
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