mise en ligne
This commit is contained in:
parent
ca574c6486
commit
73e26ecffe
@ -24,8 +24,8 @@ test:
|
||||
production:
|
||||
adapter: mysql2
|
||||
encoding: utf8
|
||||
database: blog_perso_app
|
||||
database: ecole_eft_app
|
||||
pool: 5
|
||||
username: blog_perso_app
|
||||
password: blog_perso_prod
|
||||
username: ecole_eft_app
|
||||
password: ecole_eft_app
|
||||
socket: /var/run/mysqld/mysqld.sock
|
@ -1,5 +1,6 @@
|
||||
set :application, 'blog_perso_app'
|
||||
set :domain, 'blog.nicolasbally.com'
|
||||
set :application, 'ecole_eft_app'
|
||||
set :domain, 'new.ecole-eft-france.fr'
|
||||
|
||||
|
||||
|
||||
|
||||
@ -28,7 +29,7 @@ set :application, 'blog_perso_app'
|
||||
role :db, domain, :primary => true
|
||||
|
||||
set :scm, :git
|
||||
set :repository, "git@box1.quartz-agence.com:#{application}.git"
|
||||
set :repository, "git@gitlab.bally.me:root/site-perso.git"
|
||||
set :branch, "master"
|
||||
|
||||
default_run_options[:pty] = true
|
||||
@ -80,6 +81,9 @@ set :application, 'blog_perso_app'
|
||||
run "ln -s #{deploy_to}shared/storage/private #{release_path}/private_medias"
|
||||
run "rm -rf #{release_path}/public/public_medias"
|
||||
run "ln -s #{deploy_to}shared/storage/public #{release_path}/public/public_medias"
|
||||
|
||||
run "rm -rf #{release_path}/db/production.sqlite3"
|
||||
run "ln -s #{deploy_to}shared/production.sqlite3 #{release_path}/db/production.sqlite3"
|
||||
end
|
||||
|
||||
task :start do
|
||||
@ -91,6 +95,11 @@ set :application, 'blog_perso_app'
|
||||
task :restart, :roles => :app, :except => { :no_release => true } do
|
||||
sudo "service #{application} restart"
|
||||
end
|
||||
|
||||
task :reload_nginx do
|
||||
sudo "service nginx reload"
|
||||
end
|
||||
|
||||
task :migrate do
|
||||
run "cd #{deploy_to}current && rake db:migrate RAILS_ENV=#{rails_env}"
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
upstream blog_perso_app_unicorn {
|
||||
upstream ecole_eft_app_unicorn {
|
||||
server unix:/home/web/blog_perso_app/shared/tmp/unicorn.sock fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name blog.nicolasbally.com;
|
||||
root /home/web/blog_perso_app/current/public;
|
||||
server_name ecole-eft-france.fr;
|
||||
root /home/web/ecole_eft_app/current/public;
|
||||
try_files $uri/index.html $uri @unicorn;
|
||||
|
||||
location @unicorn {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://blog_perso_app_unicorn;
|
||||
proxy_pass http://ecole_eft_app_unicorn;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /500.html;
|
||||
@ -22,6 +22,6 @@ server {
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name www.blog.nicolasbally.com;
|
||||
rewrite ^(.*) http://blog.nicolasbally.com$1 permanent;
|
||||
server_name www.ecole-eft-france.fr;
|
||||
rewrite ^(.*) http://ecole-eft-france.fr$1 permanent;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
@rails_app = "blog_perso_app"
|
||||
@rails_app = "ecole_eft_app"
|
||||
|
||||
working_directory "/home/web/#{@rails_app}/current"
|
||||
pid "/home/web/#{@rails_app}/shared/unicorn.pid"
|
||||
|
Loading…
x
Reference in New Issue
Block a user