mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-14 08:50:44 +00:00
Improve install log
Remove unused files Update .env.example
This commit is contained in:
parent
6bcc8dc76b
commit
ed9ecdc66b
5 changed files with 31 additions and 12 deletions
|
@ -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
3
.gitignore
vendored
|
@ -1,8 +1,9 @@
|
|||
# Rails, etc
|
||||
# Rails, Ruby, etc
|
||||
/coverage/
|
||||
/log/*
|
||||
/tmp/*
|
||||
/spec/tmp/*
|
||||
.ruby-version
|
||||
.env
|
||||
.tmp*
|
||||
.rspec
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
2.1.1
|
10
INSTALL.md
10
INSTALL.md
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue