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

Add redis index deploy features. #91

Closed
arenoir opened this issue Mar 10, 2015 · 3 comments
Closed

Add redis index deploy features. #91

arenoir opened this issue Mar 10, 2015 · 3 comments

Comments

@arenoir
Copy link

arenoir commented Mar 10, 2015

I have nginx installed with the HTTP_REDIS module so it would be advantageous to have nginx serve the index.html file. However the nginx redis module is very limited. It is not easy to lookup the key and then use the key to fetch the content.

I am thinking a improved approach would be to copy the index content to the value of the current key thus eliminated the need for a lookup.

The second thing I ran into was wanting to store the html cache.manifest file in redis as well. I know cache.manifest is a bastard, but it does help with mobile.

Just wanted to run this by the team. I will most likely fork the ember-deploy-redis repo and implement this functionality.

🍻 to paving the cow paths.

Here is the nginx config; quite simple.

map $arg_version $app_version {
    default "current";
    ~^\w+ $arg_version;
}
upstream redisbackend{
    server 127.0.0.1:6379;
}
server {
    location / {
        set $redis_key my-app:$app_version;
        redis_pass redisbackend;
        default_type text/html;
    }
}
@arenoir
Copy link
Author

arenoir commented Mar 10, 2015

Any one have any thoughts about the cache.manifest?

@lukemelia
Copy link
Contributor

Hi @arenoir... I think having the right hooks to support for a cache manifest is a good idea. I don't envy you though -- those things are a pain in the ass to deal with.

Regarding writing the HTML content directly to the "current" key in redis, I would like for it to be easy for you to do this in your own addon. It would definitely not become the default behavior for a redis addon because it eliminates many of the benefits of the addon, such as preview and rollback support.

Stay tuned to #88 and chime in if you think the hooks we are planning will not be sufficient to achieve what you need.

@arenoir
Copy link
Author

arenoir commented Mar 11, 2015

@lukemelia thanks for the reply. I just pushed a pull request to ember-deploy-redis that allows writing directly to the content current key. Preview and rollback still work, I just moved where the version number was stored.

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

No branches or pull requests

2 participants