Merge branch 'master' of quartz.snlab.fr:nicolas/ual_app
This commit is contained in:
commit
9534e98045
@ -119,7 +119,7 @@ GEM
|
||||
rdoc (4.1.1)
|
||||
json (~> 1.4)
|
||||
ref (1.0.5)
|
||||
rmagick (2.13.3)
|
||||
rmagick (2.13.4)
|
||||
rvm-capistrano (1.5.3)
|
||||
capistrano (~> 2.15.4)
|
||||
sass (3.2.19)
|
||||
|
@ -98,7 +98,11 @@ class Admin::ContactsController < ApplicationController
|
||||
}
|
||||
|
||||
@contact = Contact.new(contact_api_params)
|
||||
@contact.provenance_id = 2
|
||||
if params[:provenance_id]
|
||||
@contact.provenance_id = 3
|
||||
else
|
||||
@contact.provenance_id = 2
|
||||
end
|
||||
if @contact.save(:validate => false)
|
||||
render :inline => "ok"
|
||||
puts "OK"
|
||||
|
@ -25,6 +25,18 @@
|
||||
|
||||
|
||||
%body
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-37291832-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-37291832-2');
|
||||
gtag('config', 'AW-1037540800');
|
||||
|
||||
</script>
|
||||
|
||||
%a{:id => "top_anchor"}
|
||||
|
||||
|
||||
@ -76,7 +88,7 @@
|
||||
|
||||
=#render(:partial => "public/shared/first_menu")
|
||||
|
||||
-if true
|
||||
-if false
|
||||
.info
|
||||
%p
|
||||
Opportunité : Nous possédons des emplacements sur des parkings de supermarchés dans les villes suivantes :
|
||||
@ -246,13 +258,5 @@
|
||||
=link_to "Lux Laverie", "http://luxlaverie.com", :target => "_blank"
|
||||
|
||||
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-37291832-2', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
|
@ -1,2 +1,7 @@
|
||||
%h3 Merci pour votre message
|
||||
%p Nous vous remercions pour votre message et vous répondrons dans les meilleurs délais.
|
||||
%p Nous vous remercions pour votre message et vous répondrons dans les meilleurs délais.
|
||||
|
||||
<!-- Event snippet for formulaire conversion page -->
|
||||
<script>
|
||||
gtag('event', 'conversion', {'send_to': 'AW-1037540800/Jo1pCLnngF0QwLve7gM'});
|
||||
</script>
|
@ -1,13 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
@ -1,26 +1,26 @@
|
||||
|
||||
|
||||
set :application, 'ual_app'
|
||||
set :domain, '62.210.187.249'
|
||||
set :domain, 'quartz-www02.sysnove.net'
|
||||
|
||||
|
||||
|
||||
set :user, 'web'
|
||||
set :scm_user, "git"
|
||||
set :scm_host, "git.nicolasbally.com"
|
||||
set :scm_host, "quartz.snlab.fr"
|
||||
|
||||
|
||||
|
||||
set :rvm_ruby_string, 'ruby-2.1.2@ual'
|
||||
set :rvm_ruby_string, 'ruby-2.1.2'
|
||||
set :rvm_autolibs_flag, "read-only"
|
||||
|
||||
#set :bundle_cmd, "/home/#{user}/.rvm/gems/#{rvm_ruby_string}/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 @@ role :db, domain, :primary => true
|
||||
|
||||
set :scm, :git
|
||||
|
||||
set :repository, "#{scm_user}@#{scm_host}:root/#{application}.git"
|
||||
set :repository, "#{scm_user}@#{scm_host}:nicolas/#{application}.git"
|
||||
|
||||
set :branch, "master"
|
||||
|
||||
@ -49,7 +49,7 @@ require 'bundler/capistrano'
|
||||
load 'deploy/assets'
|
||||
|
||||
namespace :deploy do
|
||||
|
||||
|
||||
# namespace :assets do
|
||||
# task :precompile, :roles => :web, :except => { :no_release => true } do
|
||||
# from = source.next_revision(current_revision)
|
||||
@ -60,42 +60,47 @@ namespace :deploy do
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
desc "Symlink shared config files"
|
||||
task :symlink_config_files do
|
||||
|
||||
|
||||
|
||||
|
||||
run "ln -s #{deploy_to}shared/storage/private #{current_path}/private_medias"
|
||||
|
||||
run "ln -s #{deploy_to}shared/storage/public #{current_path}/public/public_medias"
|
||||
|
||||
|
||||
run "ln -s #{deploy_to}shared/production.sqlite3 #{current_path}/db/production.sqlite3"
|
||||
|
||||
sudo "cp #{current_path}/config/env_init #{deploy_to}env_init"
|
||||
|
||||
sudo "cp #{current_path}/config/unicorn_init_d /etc/init.d/#{application}"
|
||||
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
|
||||
|
||||
|
||||
sudo "rm -rf /etc/nginx/sites-enabled/#{application}"
|
||||
sudo "ln -s #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application} "
|
||||
|
||||
|
||||
sudo "service nginx reload"
|
||||
end
|
||||
|
||||
@ -105,24 +110,25 @@ namespace :deploy do
|
||||
run "cd #{deploy_to}current && rake db:seed RAILS_ENV=#{rails_env}"
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
task :create_files_folders do
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
#before 'deploy:setup', 'rvm:install_rvm' # install RVM
|
||||
#before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, OR:
|
||||
#before 'deploy:setup', 'rvm:create_gemset' # only create gemset
|
||||
|
||||
|
||||
|
||||
|
||||
after "deploy:setup", "deploy:create_files_folders"
|
||||
@ -135,4 +141,7 @@ before "deploy:restart", "deploy:symlink_config_files"
|
||||
after "deploy", "deploy:cleanup"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
config/env_init
Normal file
6
config/env_init
Normal file
@ -0,0 +1,6 @@
|
||||
APP_RUBY=2.1.2
|
||||
ENV=production
|
||||
APP_ROOT=/srv/www/web/ual_app/current/
|
||||
GEM_HOME=/srv/www/web/.rvm/gems/ruby-$APP_RUBY
|
||||
UNICORN_OPTS="-D -E ${ENV} -c ${APP_ROOT}/config/unicorn.rb"
|
||||
|
@ -1,11 +1,11 @@
|
||||
upstream ual_app_unicorn {
|
||||
server unix:/home/web/ual_app/shared/unicorn.sock fail_timeout=0;
|
||||
server unix:/srv/www/web/ual_app/shared/tmp/unicorn.sock fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name une-autre-laverie.com;
|
||||
root /home/web/ual_app/current/public;
|
||||
root /srv/www/web/ual_app/current/public;
|
||||
try_files $uri/index.html $uri @unicorn;
|
||||
|
||||
location @unicorn {
|
||||
@ -22,7 +22,7 @@ server {
|
||||
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name www.une-autre-laverie.com www.une-autre-laverie.fr une-autre-laverie.fr www.uneautrelaverie.fr uneautrelaverie.fr www.uneautrelaverie.com uneautrelaverie.com;
|
||||
rewrite ^(.*) http://une-autre-laverie.com$1 permanent;
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
@rails_app = "ual_app"
|
||||
|
||||
working_directory "/home/web/#{@rails_app}/current"
|
||||
pid "/home/web/#{@rails_app}/shared/unicorn.pid"
|
||||
stderr_path "/home/web/#{@rails_app}/shared/unicorn.log"
|
||||
stdout_path "/home/web/#{@rails_app}/shared/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
|
||||
|
@ -7,11 +7,11 @@ set -e
|
||||
# Change these to match your app:
|
||||
APP_NAME=ecole_eft_app
|
||||
APP_RUBY=2.1.2@ual
|
||||
APP_ROOT="/home/web/ual_app/current"
|
||||
PID="/home/web/ual_app/shared/unicorn.pid"
|
||||
APP_ROOT="/srv/www/web/ual_app/current"
|
||||
PID="/srv/www/web/ual_app/shared/unicorn.pid"
|
||||
ENV=production
|
||||
|
||||
GEM_HOME="/home/web/ual_app/shared/bundle/ruby/2.1.0"
|
||||
GEM_HOME="/srv/www/web/ual_app/shared/bundle/ruby/2.1.0"
|
||||
|
||||
UNICORN_OPTS="-D -E $ENV -c $APP_ROOT/config/unicorn.rb"
|
||||
|
||||
|
BIN
public/provenance/3.png
Normal file
BIN
public/provenance/3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Loading…
x
Reference in New Issue
Block a user