capistrano-plugins / capistrano-unicorn-nginx

Capistrano tasks for automatic and sensible unicorn + nginx configuration
MIT License
175 stars 81 forks source link

Nginx conf generation / copying in setup #44

Closed pgmcdonnell closed 8 years ago

pgmcdonnell commented 9 years ago

I really like the idea of this plugin, but have run into a small issue with the setup step not seeming to copy a generated nginx.conf to my server. I've tried the default (non-manually generated) and with manually generated template (using bundle exec rails g capistrano:unicorn_nginx:config) but upon running bundle exec cap staging setup no new nginx.conf file is copied onto my staging server. Any suggestions welcome, I think all my permissions and keys are in order, certainly bundle exec cap staging deploy:check succeeds.

Gemfile

source 'https://rubygems.org'

gem 'rails', '4.2.0'
gem 'rails-api'
gem 'spring', :group => :development

gem 'pg'

# To use ActiveModel has_secure_password
gem 'bcrypt'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
gem 'unicorn'

# Deploy with Capistrano
gem 'capistrano', :group => :development
gem 'capistrano-rails', :group => :development
gem 'capistrano-unicorn-nginx', :group => :development

Capfile

# Load DSL and set up stages
require 'capistrano/setup'

# Include default deployment tasks
require 'capistrano/deploy'

require 'capistrano/bundler'
require 'capistrano/rails/migrations'
require 'capistrano/unicorn_nginx'

# Load custom tasks from `lib/capistrano/tasks' if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }

deploy\staging.rb

role :app, %w{deploy@unified-staging}
role :web, %w{deploy@unified-staging}
#role :db,  %w{deploy@example.com}
rhomeister commented 8 years ago

@pgmcdonnell did you solve this in the end? If so, could you submit a PR or explain how you solved this and close the issue?

pgmcdonnell commented 8 years ago

@rhomeister I'm sorry, I don't have a clear answer here. Shortly after opening the issue I had to switch projects then once I returned to it I just reverted and went with Vanilla Capistrano.

Re-reading the issue I'm pretty sure (despite my assertions) that I must have messed up my permissions. I'll close the issue on that basis (with apologies!).