c-w opened a new pull request, #29499:
URL: https://github.com/apache/superset/pull/29499
### SUMMARY
This PR adds some configuration options for the docker-compose setup:
1. Enable using a password when connecting to redis
2. Enable using redis as the results backend
These changes are useful in scenarios where we want to use the
docker-compose setup together with an existing redis instance and when we
potentially want to run the superset UI on a different node from the superset
workers without going all the way to using the k8s setup.
### TESTING INSTRUCTIONS
For testing the redis password support, apply the following patch:
```diff
diff --git a/docker-compose-image-tag.yml b/docker-compose-image-tag.yml
index 9309c6d619..b8c5aad55d 100644
--- a/docker-compose-image-tag.yml
+++ b/docker-compose-image-tag.yml
@@ -38,6 +38,11 @@ services:
restart: unless-stopped
volumes:
- redis:/data
+ entrypoint:
+ - sh
+ command:
+ - -c
+ - printf "requirepass supersecret\n" | exec redis-server -
db:
env_file:
diff --git a/docker/.env b/docker/.env
index 57575da76e..e5749aa3b3 100644
--- a/docker/.env
+++ b/docker/.env
@@ -49,6 +49,7 @@ POSTGRES_PASSWORD=superset
PYTHONPATH=/app/pythonpath:/app/docker/pythonpath_dev
REDIS_HOST=redis
REDIS_PORT=6379
+REDIS_PASSWORD=supersecret
FLASK_DEBUG=true
SUPERSET_ENV=development
```
Now start the stack via `TAG=4.0.2 docker compose -f
docker-compose-image-tag.yml up` and verify that Redis operations work.
For testing the redis results backend support, toggle the feature via `echo
RESULTS_BACKEND_CACHE_TYPE=RedisCache > docker/.env-local`, restart the stack,
and verify that Redis operations work.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]