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 a task for uploading nginx site config and a generator for configuring template before uploadinging #57

Merged
merged 3 commits into from
Jul 28, 2014

Conversation

dfang
Copy link
Contributor

@dfang dfang commented Jul 28, 2014

add a task cap ningx:config to upload nginx site config
add a generator rails g capistrano:nginx_puma:config for customizing template before uploading
update readme

template("nginx_conf.erb", "/tmp/nginx_#{fetch(:nginx_config_name)}")
if fetch(:nginx_config_path) == "/etc/nginx/sites-available"
sudo :mv, "/tmp/nginx_#{fetch(:nginx_config_name)} /etc/nginx/sites-available/#{fetch(:nginx_config_name)}"
sudo :ln, "-fs", "/etc/nginx/sites-available/#{fetch(:nginx_config_name)} /etc/nginx/sites-enabled/#{fetch(:nginx_config_name)}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have the nginx paths in a variable too. some people have nginx installed in /opt/nginx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. if nginx is installed in /opt/nginx, is there a site-available folder and where is it ?

thanks !

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normally it should be /opt/nginx/sites-availables, but to cover all weird settings, we can fetch for :nginx_sites_available_path, wdyt ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to add yourself to the contributors list in the Readme.

seuros added a commit that referenced this pull request Jul 28, 2014
Add a task for uploading nginx site config and a generator for configuring template before uploadinging
@seuros seuros merged commit 476c33e into seuros:master Jul 28, 2014
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