Use a default Redis password

Although it does not provide any additional security, it shows how to
configure Redis with a password and how to use Netbox using a password
protected redis server. Something that might be considered in a classic
production deployment. (But is mostly irrelevant in e.g. a Kubernetes /
OpenShift deployment as the isolation is usually on a network level.)
This commit is contained in:
Christian Mäder 2018-08-13 15:19:29 -07:00
parent 013f81b791
commit 645ec1281c
No known key found for this signature in database
GPG key ID: 92FFD0A711F196BB
4 changed files with 19 additions and 7 deletions

View file

@ -45,7 +45,11 @@ services:
- netbox-postgres-data:/var/lib/postgresql/data
redis:
image: redis:4-alpine
command: redis-server --appendonly yes
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --appendonly yes --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
env_file: redis.env
volumes:
- netbox-redis-data:/data
volumes: