This script automates the setup of a Redis container with secure access via stunnel. It generates a unique ID for the Redis instance, a secure password, and finds free ports for Redis and stunnel.
- Starts a Redis container with a unique volume and password.
- Sets up a stunnel container to provide secure access to the Redis instance.
- Assumes the availability of a wildcard certificate, key, and CA file for your domain.
Run the script start-redis-stunnel.sh
to start the Redis container with stunnel.
# Start script with default values
# TLS is disabled
# Redis memory is set to 256m
# Stunnel memory is set to 64m
./start-redis-stunnel.sh
# Start Redis with TLS enabled
./start-redis-stunnel.sh --tls
# Start Redis with custom memory limit
./start-redis-stunnel.sh --redis-memory 512m --stunnel-memory 128m
- Docker installed
- Wildcard certificate, key, and CA file for your domain
This script is intended for demonstration purposes and may require customization for production use.