Improve install log

Remove unused files
Update .env.example
This commit is contained in:
Luke Barratt 2014-03-23 00:56:13 +00:00
parent 8ed526716f
commit c9f645bb5c
5 changed files with 31 additions and 12 deletions

View file

@ -1,8 +1,9 @@
RAILS_ENV=
APP_SECRET=
UNICORN_WORKERS=3
UNICORN_PORT=5000
UNICORN_SOCKET=/tmp/unicorn.ensl.sock
APP_SECRET=
MYSQL_USERNAME=
MYSQL_PASSWORD=

3
.gitignore vendored
View file

@ -1,8 +1,9 @@
# Rails, etc
# Rails, Ruby, etc
/coverage/
/log/*
/tmp/*
/spec/tmp/*
.ruby-version
.env
.tmp*
.rspec

View file

@ -1 +0,0 @@
2.1.1

View file

@ -21,6 +21,16 @@ Add the following to `/etc/sudoers` to allow the `deploy` user to manage nginx a
deploy ALL=NOPASSWD:START_FOREMAN
deploy ALL=NOPASSWD:/etc/init.d/nginx
## Install MySQL
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
Login to mysql as root, and create the database and user account:
CREATE DATABASE `ensl`;
CREATE USER 'xxx'@'localhost' IDENTIFIED BY 'xxx';
GRANT ALL PRIVILEGES ON ensl.* TO 'xxx'@'localhost' WITH GRANT OPTION;
## Install rbenv, ruby and bundler
As root, install dependencies

View file

@ -24,22 +24,30 @@ end
namespace :foreman do
desc "Export the Procfile to Ubuntu's upstart scripts"
task :export, :roles => :app do
run "cd #{current_path} && #{sudo} foreman export upstart /etc/init -a #{app_name} -u #{user} -l #{fetch(:deploy_to)}/shared/log"
task :export do
on roles(:app) do |host|
run "cd #{current_path} && #{sudo} foreman export upstart /etc/init -a #{app_name} -u #{user} -l #{fetch(:deploy_to)}/shared/log"
end
end
desc "Start the application services"
task :start, :roles => :app do
run "#{sudo} service #{app_name} start"
task :start do
on roles(:app) do |host|
run "#{sudo} service #{app_name} start"
end
end
desc "Stop the application services"
task :stop, :roles => :app do
run "#{sudo} service #{app_name} stop"
task :stop do
on roles(:app) do |host|
run "#{sudo} service #{app_name} stop"
end
end
desc "Restart the application services"
task :restart, :roles => :app do
run "#{sudo} service #{app_name} start || #{sudo} service #{app_name} restart"
task :restart do
on roles(:app) do |host|
run "#{sudo} service #{app_name} start || #{sudo} service #{app_name} restart"
end
end
end