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?
Okay, your best bet is to set up a virtualenv
, activate it and then install the application in that virtualenv
and run it from there :-)
Besides that there are options of using the setuptools/distutils to install into your local user folder by using the --user
argument to easy_install as noted here: http://docs.python.org/install/index.html
But seriously, use virtualenv :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With