I'm a beginner for Pyramid.
I want to deploy Pyramid to my production server. I have a deploy script using Capistrano to do this.
set :pid_path, "/var/lib/#{application}"
set :log_path, "/var/log/#{application}"
namespace :deploy do
task :restart, :roles => :app do
end
task :finalize_update, :roles => :app do
run "cd #{release_path} && python setup.py build"
%w[ 5000 5001 ].each do |port|
run "if [ -f #{pid_path}/#{port}.pid ]; then paster serve --stop-daemon --pid-file=#{pid_path}/#{port}.pid; fi"
run "paster serve --daemon --pid-file=#{pid_path}/#{port}.pid --log-file=#{log_path}/paster.log #{release_path}/production.ini http_port=#{port}"
end
end
end
But it does not work without installation typing 'sudo python setup.py install'. If I write code to do this, it might work but I don't want to do it because of permissions.
Does someone have any suggestions?