-
Notifications
You must be signed in to change notification settings - Fork 22
Setting up Caching #12
Comments
This looks like a slew of problems that unfolded one after another for me:
The Alternatively, I can add some code to the default Redis is not installed The FROM amancevice/caravel:0.10.0
RUN pip3 install redis==2.10.5 Ought to do the trick. I don't think it would be a huge burden to bake this into the standard image but I'd need to think about it. Regardless, we move onto the next issue: Incorrect Config The configuration you provided seems to be incorrect. Specifically the After all that, though: Python3 is not fully supported in I got it mostly working except that it looks like there is a bug in caravel |
For posterity here is what I used to test this stuff: I created a new empty caravel DB touch caravel.db I wrote a version: '2'
services:
redis:
image: redis:alpine
caravel:
image: amancevice/caravel
depends_on:
- redis
ports:
- "8088:8088"
volumes:
- "./caravel.db:/home/caravel/db/caravel.db"
links:
- redis
environment:
- "DEBUG=1"
- "CACHE_CONFIG={\"CACHE_TYPE\": \"redis\", \"CACHE_DEFAULT_TIMEOUT\": 30, \"CACHE_KEY_PREFIX\": \"caravel_\", \"CACHE_REDIS_HOST\": \"redis\", \"CACHE_REDIS_PORT\": 6379, \"CACHE_REDIS_DB\": 1, \"CACHE_REDIS_URL\": \"redis://redis:6379/1\"}" I brought up the composition with docker-compose exec caravel demo I then had a DB to work with as I experimented with the setup. |
I have added a |
Ah yes... not as easy as I first imagined. Not a huge deal - may just have to use this image as a base as suggested. Good excuse to learn Docker! Redis and Cache config sound like the bigger problems - at least Py 3 support is becoming standard pretty quickly. I'll let you know how |
I tested |
@PanJ I'm hoping AirBnB (paging @mistercrunch :) releases the next version of caravel soon since it contains fixes for Python3. I'm not crazy about reverting the project back to Python2 but I would be okay with adding the redis pip to the image. |
I updated the to |
Caravel's own documentation is non-existant but it suggests passing a JSON into the config like so, based on the Flask Cache:
Via apache/superset#390
Therefore, I'd assume this should work for the docker:
But it throws this when I start the container and check the logs:
EDIT: I'd be happy to do a pull request with further instructions setting up Redis Caching.
The text was updated successfully, but these errors were encountered: