mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 12:30:48 +00:00
Improve install log
Remove unused files Update .env.example
This commit is contained in:
parent
8ed526716f
commit
c9f645bb5c
5 changed files with 31 additions and 12 deletions
|
@ -1,8 +1,9 @@
|
||||||
|
RAILS_ENV=
|
||||||
|
APP_SECRET=
|
||||||
|
|
||||||
UNICORN_WORKERS=3
|
UNICORN_WORKERS=3
|
||||||
UNICORN_PORT=5000
|
UNICORN_PORT=5000
|
||||||
UNICORN_SOCKET=/tmp/unicorn.ensl.sock
|
UNICORN_SOCKET=/tmp/unicorn.ensl.sock
|
||||||
|
|
||||||
APP_SECRET=
|
|
||||||
|
|
||||||
MYSQL_USERNAME=
|
MYSQL_USERNAME=
|
||||||
MYSQL_PASSWORD=
|
MYSQL_PASSWORD=
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,8 +1,9 @@
|
||||||
# Rails, etc
|
# Rails, Ruby, etc
|
||||||
/coverage/
|
/coverage/
|
||||||
/log/*
|
/log/*
|
||||||
/tmp/*
|
/tmp/*
|
||||||
/spec/tmp/*
|
/spec/tmp/*
|
||||||
|
.ruby-version
|
||||||
.env
|
.env
|
||||||
.tmp*
|
.tmp*
|
||||||
.rspec
|
.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:START_FOREMAN
|
||||||
deploy ALL=NOPASSWD:/etc/init.d/nginx
|
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
|
## Install rbenv, ruby and bundler
|
||||||
|
|
||||||
As root, install dependencies
|
As root, install dependencies
|
||||||
|
|
|
@ -24,22 +24,30 @@ end
|
||||||
|
|
||||||
namespace :foreman do
|
namespace :foreman do
|
||||||
desc "Export the Procfile to Ubuntu's upstart scripts"
|
desc "Export the Procfile to Ubuntu's upstart scripts"
|
||||||
task :export, :roles => :app do
|
task :export do
|
||||||
run "cd #{current_path} && #{sudo} foreman export upstart /etc/init -a #{app_name} -u #{user} -l #{fetch(:deploy_to)}/shared/log"
|
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
|
end
|
||||||
|
|
||||||
desc "Start the application services"
|
desc "Start the application services"
|
||||||
task :start, :roles => :app do
|
task :start do
|
||||||
run "#{sudo} service #{app_name} start"
|
on roles(:app) do |host|
|
||||||
|
run "#{sudo} service #{app_name} start"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Stop the application services"
|
desc "Stop the application services"
|
||||||
task :stop, :roles => :app do
|
task :stop do
|
||||||
run "#{sudo} service #{app_name} stop"
|
on roles(:app) do |host|
|
||||||
|
run "#{sudo} service #{app_name} stop"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Restart the application services"
|
desc "Restart the application services"
|
||||||
task :restart, :roles => :app do
|
task :restart do
|
||||||
run "#{sudo} service #{app_name} start || #{sudo} service #{app_name} restart"
|
on roles(:app) do |host|
|
||||||
|
run "#{sudo} service #{app_name} start || #{sudo} service #{app_name} restart"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in a new issue