Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate redis docker container and use it as LRU cache #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Integrate redis docker container and use it as LRU cache #4

wants to merge 2 commits into from

Conversation

Pindar
Copy link
Contributor

@Pindar Pindar commented Sep 11, 2014

No description provided.

@mbabineau
Copy link
Member

Thanks, it'll be great to get this cache in.

I may be missing something, but where are REDIS_PORT_6379_TCP_ADDR, REDIS_PORT_6379_TCP_PORT, CACHE_LRU_REDIS_DB, and CACHE_LRU_REDIS_PASSWORD getting set?

Also, it would be good to start redis-cache in the same way as docker-registry - that is, via runit. This ensures the container will restart in case of a failure. Note that this will break the use of --link, so maybe we use host networking (docker run --net=host) for both containers instead?

@Pindar
Copy link
Contributor Author

Pindar commented Sep 19, 2014

@mbabineau hey yea so far it seems to work on mine but let's improve it further.

  • the environment variables are set through the standard docker container linking (specially for the redis you find information on this page https://registry.hub.docker.com/_/redis/). The CACHE_LRU_REDIS_DB / CACHE_LRU_REDIS_PASSWORD variables are not set we could strip them out.
  • regarding the startup with runit: so far as I have understood is that if you are running a docker container as deamon (-d) the default docker configuration would restart this container after a reboot automatically -- so there wouldn't be a need of runit/upstart but I might be wrong in this case because I haven't tested it yet. I just thought that if this is true we could get rid of runit and the custom AMI entirely what would make things a bit leaner (but this should be made in a separate pull request I guess)
  • the docker linking would also work with runit if we can start the services in the correct order -- is this possible?

I have it running with S3 redirect and the redis cache and it's working fine so far but the cache is not so much in use because of the S3 redirects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants