ajout
This commit is contained in:
commit
3d27e71dce
@ -71,6 +71,7 @@
|
||||
#home
|
||||
=image_tag "/heylium-logo.png", :id => "logo"
|
||||
%h3 L’application géolocalisée pour tous, partout, tout le temps
|
||||
-if false
|
||||
.links
|
||||
=link_to image_tag("/heylium-ios.png"), "https://itunes.apple.com/fr/app/heylium/id1079057397?l=fr&ls=1&mt=8", :class => "ios"
|
||||
=link_to image_tag("/heylium-android.png"), "https://play.google.com/store/apps/details?id=com.olwen_capital.afunda_ios", :class => "ios"
|
||||
@ -152,6 +153,7 @@
|
||||
</svg>
|
||||
|
||||
%h2 Commencez dès maintenant !
|
||||
-if false
|
||||
.links
|
||||
=link_to image_tag("/heylium-ios.png"), "https://itunes.apple.com/fr/app/heylium/id1079057397?l=fr&ls=1&mt=8", :class => "ios"
|
||||
=link_to image_tag("/heylium-android.png"), "https://play.google.com/store/apps/details?id=com.olwen_capital.afunda_ios", :class => "ios"
|
||||
|
31
config/deploy.rb
Executable file → Normal file
31
config/deploy.rb
Executable file → Normal file
@ -1,26 +1,26 @@
|
||||
set :application, 'heylium_app'
|
||||
set :domain, 'heylium.quartz.xyz'
|
||||
set :domain, 'quartz-www02.sysnove.net'
|
||||
|
||||
|
||||
|
||||
set :user, 'web'
|
||||
set :scm_user, "git"
|
||||
set :scm_host, "gitlab.quartz.xyz"
|
||||
set :scm_host, "quartz.snlab.fr"
|
||||
|
||||
|
||||
|
||||
set :rvm_ruby_string, 'ruby-2.1.2'
|
||||
set :rvm_autolibs_flag, "read-only"
|
||||
|
||||
set :bundle_cmd, "/home/#{user}/.rvm/gems/#{rvm_ruby_string}@global/bin/bundle"
|
||||
set :bundle_dir, "/home/#{user}/.rvm/gems/#{rvm_ruby_string}"
|
||||
set :bundle_cmd, "/srv/www/#{user}/.rvm/gems/#{rvm_ruby_string}@global/bin/bundle"
|
||||
set :bundle_dir, "/srv/www/#{user}/.rvm/gems/#{rvm_ruby_string}"
|
||||
set :use_sudo, false
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set :deploy_to, "/home/#{user}/#{application}/"
|
||||
set :deploy_to, "/srv/www/#{user}/#{application}/"
|
||||
set :deploy_via, :remote_cache
|
||||
|
||||
set :normalize_asset_timestamps, false
|
||||
@ -33,7 +33,7 @@ set :application, 'heylium_app'
|
||||
|
||||
set :scm, :git
|
||||
|
||||
set :repository, "#{scm_user}@#{scm_host}:nbally/#{application}.git"
|
||||
set :repository, "#{scm_user}@#{scm_host}:nicolas/#{application}.git"
|
||||
|
||||
set :branch, "master"
|
||||
|
||||
@ -74,22 +74,26 @@ set :application, 'heylium_app'
|
||||
|
||||
run "ln -s #{deploy_to}shared/production.sqlite3 #{current_path}/db/production.sqlite3"
|
||||
|
||||
sudo "cp #{current_path}/config/unicorn_init_d /etc/init.d/#{application}"
|
||||
sudo "cp #{current_path}/config/env_init #{deploy_to}env_init"
|
||||
|
||||
sudo "sudo systemctl enable quartz_app@#{application}"
|
||||
|
||||
|
||||
|
||||
|
||||
sudo "chmod +x /etc/init.d/#{application}"
|
||||
sudo "update-rc.d #{application} defaults "
|
||||
end
|
||||
|
||||
|
||||
|
||||
task :start do
|
||||
sudo "service #{application} start"
|
||||
sudo "systemctl start quartz_app@#{application}"
|
||||
end
|
||||
task :stop do
|
||||
run "service #{application} stop"
|
||||
sudo "systemctl stop quartz_app@#{application}"
|
||||
end
|
||||
task :restart do
|
||||
sudo "service #{application} restart"
|
||||
sudo "systemctl stop quartz_app@#{application}"
|
||||
sudo "systemctl start quartz_app@#{application}"
|
||||
end
|
||||
|
||||
task :reload_nginx do
|
||||
@ -113,6 +117,7 @@ set :application, 'heylium_app'
|
||||
run "mkdir #{deploy_to}shared/storage"
|
||||
run "mkdir #{deploy_to}shared/storage/private"
|
||||
run "mkdir #{deploy_to}shared/storage/public"
|
||||
run "mkdir #{deploy_to}shared/tmp"
|
||||
end
|
||||
|
||||
|
||||
@ -138,3 +143,5 @@ set :application, 'heylium_app'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
upstream heylium_app_unicorn {
|
||||
server unix:/home/web/heylium_app/shared/unicorn.sock fail_timeout=0;
|
||||
server unix:/srv/www/web/heylium_app/shared/tmp/unicorn.sock fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:443 ssl;
|
||||
server_name heylium.quartz.xyz heylium.io;
|
||||
root /home/web/heylium_app/current/public;
|
||||
root /srv/www/web/heylium_app/current/public;
|
||||
try_files $uri/index.html $uri @unicorn;
|
||||
|
||||
location @unicorn {
|
||||
@ -18,12 +18,34 @@ server {
|
||||
error_page 500 502 503 504 /500.html;
|
||||
client_max_body_size 4G;
|
||||
keepalive_timeout 10;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate /etc/letsencrypt/live/heylium.io/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/heylium.io/privkey.pem;
|
||||
|
||||
include snippets/letsencrypt.conf;
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name www.heylium.io;
|
||||
rewrite ^(.*) http://heylium.io permanent;
|
||||
listen [::]:80;
|
||||
server_name *.heylium.io heylium.io;
|
||||
|
||||
return 301 https://heylium.io$request_uri;
|
||||
|
||||
include snippets/letsencrypt.conf;
|
||||
}
|
||||
|
||||
|
||||
server {
|
||||
listen [::]:443 ssl;
|
||||
server_name *.heylium.io;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate /etc/letsencrypt/live/heylium.io/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/heylium.io/privkey.pem;
|
||||
|
||||
return 301 https://heylium.io$request_uri;
|
||||
|
||||
include snippets/letsencrypt.conf;
|
||||
}
|
||||
|
12
config/unicorn.rb
Executable file → Normal file
12
config/unicorn.rb
Executable file → Normal file
@ -1,10 +1,10 @@
|
||||
@rails_app = "heylium_app"
|
||||
|
||||
working_directory "/home/web/#{@rails_app}/current"
|
||||
pid "/home/web/#{@rails_app}/shared/unicorn.pid"
|
||||
stderr_path "/home/web/#{@rails_app}/shared/log/unicorn.log"
|
||||
stdout_path "/home/web/#{@rails_app}/shared/log/unicorn.log"
|
||||
working_directory "/srv/www/web/#{@rails_app}/current"
|
||||
pid "/srv/www/web/#{@rails_app}/shared/unicorn.pid"
|
||||
stderr_path "/srv/www/web/#{@rails_app}/shared/log/unicorn.log"
|
||||
stdout_path "/srv/www/web/#{@rails_app}/shared/log/unicorn.log"
|
||||
|
||||
listen "/home/web/#{@rails_app}/shared/unicorn.sock"
|
||||
listen "/srv/www/web/#{@rails_app}/shared/tmp/unicorn.sock"
|
||||
worker_processes 2
|
||||
timeout 30
|
||||
timeout 600
|
||||
|
Loading…
x
Reference in New Issue
Block a user