Initial passage à Phone App

This commit is contained in:
Nicolas Bally 2021-10-26 23:30:01 +02:00
parent f93da075b8
commit d3f7a43afe
17 changed files with 1591 additions and 1592 deletions

View File

@ -911,7 +911,7 @@
%th
%tbody
/* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`;
/* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`;
-#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp|
@ -1017,7 +1017,7 @@
%th
%tbody
/* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`;
/* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`;
-#@periode_price_lines.select("p_product_ref_id, SUM(tot_amount_ht) AS tot_amount_ht, SUM(weight_tot) AS weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("tot_amount_ht DESC").each do |ppp|
@ -1099,7 +1099,7 @@
%tbody
/* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`;
/* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`;
-#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp|
@ -1168,7 +1168,7 @@
%th
%tbody
/* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`;
/* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`;
-#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp|
@ -1266,7 +1266,7 @@
%th.numeraire CA Moyen famille / client
%tbody
/* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`;
/* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`;
-#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp|
@ -1362,7 +1362,7 @@
%th.numeraire CA Moyen famille / client
%tbody
/* 11:18:50 localhost arcom_app */ SELECT COUNT(1) FROM `order_hist_lines`;
/* 11:18:50 localhost phone_app */ SELECT COUNT(1) FROM `order_hist_lines`;
-#@periode_price_lines.select("p_product_ref_id, SUM(cc_tot_amount_ht) AS cc_tot_amount_ht, SUM(cc_weight_tot) AS cc_weight_tot, ((SELECT weight FROM `p_product_refs` WHERE id = price_lines.p_product_ref_id )) AS price_per_kg").group(:p_product_ref_id).order("cc_tot_amount_ht DESC").each do |ppp|

View File

@ -27,7 +27,7 @@
%body.admin{:id => "body_#{@qi_menu_active}"}
#right_bar
=link_to image_tag("/logo-arcom.png"), "/", :id => "logo"
=link_to image_tag("/logo-prestaphone.png"), "/", :id => "logo"
-if current_admin

View File

@ -7,4 +7,4 @@ test:
production:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
channel_prefix: arcom_app_production
channel_prefix: phone_app_production

View File

@ -5,17 +5,16 @@
# gem 'sqlite3'
#
default: &default
adapter: mysql2
encoding: utf8mb4
database: arcom_app
adapter: postgresql
encoding: unicode
database: phone_app
pool: 5
timeout: 5000
variables:
sql_mode: TRADITIONAL
development:
adapter: postgresql
database: presta_app
database: phone_app
pool: 5
username: postgres
@ -24,11 +23,11 @@ development:
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
database: db/test
production:
<<: *default
database: arcom_app
username: arcom_app
password: arcom_app
database: phone_app
username: phone_app
password: phone_app
socket: /var/run/mysqld/mysqld.sock

View File

@ -4,7 +4,7 @@
lock "~> 3.11.0"
set :application, 'arcom_app'
set :application, 'phone_app'
set :domain, 'quartz-www02.sysnove.net'

View File

@ -1,18 +1,18 @@
upstream arcom_app_unicorn {
server unix:/srv/www/web/arcom_app/shared/unicorn.sock fail_timeout=0;
upstream phone_app_unicorn {
server unix:/srv/www/web/phone_app/shared/unicorn.sock fail_timeout=0;
}
server {
listen [::]:80;
server_name arcom_app.quartz.xyz ;
root /srv/www/web/arcom_app/current/public;
server_name phone_app.quartz.xyz ;
root /srv/www/web/phone_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://arcom_app_unicorn;
proxy_pass http://phone_app_unicorn;
proxy_read_timeout 6000;
}

View File

@ -121,7 +121,7 @@ namespace :deploy do
sudo "service nginx reload"
execute "cd #{current_path}"
execute "cd /srv/www/web/arcom_app/current; npm install"
execute "cd /srv/www/web/phone_app/current; npm install"
end

View File

@ -1,7 +1,7 @@
APP_RUBY=2.6.0
ENV=production
APP_ROOT=/srv/www/web/arcom_app/current/
APP_ROOT=/srv/www/web/phone_app/current/
GEM_HOME=/srv/www/web/.rvm/gems/ruby-$APP_RUBY
UNICORN_OPTS="-D -E ${ENV} -c ${APP_ROOT}/config/unicorn.rb"

View File

@ -61,7 +61,7 @@ Rails.application.configure do
# Use a real queuing backend for Active Job (and separate queues per environment).
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "arcom_app_production"
# config.active_job.queue_name_prefix = "phone_app_production"
config.action_mailer.perform_caching = false

View File

@ -1,6 +1,6 @@
upstream arcom_app_unicorn {
server unix:/srv/www/web/arcom_app/shared/unicorn.sock fail_timeout=0;
upstream phone_app_unicorn {
server unix:/srv/www/web/phone_app/shared/unicorn.sock fail_timeout=0;
}
@ -10,15 +10,15 @@ upstream arcom_app_unicorn {
server {
listen [::]:443 ssl;
server_name arcom.basiclabs.fr;
root /srv/www/web/arcom_app/current/public;
server_name prestaphone.basiclabs.fr;
root /srv/www/web/phone_app/current/public;
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_redirect off;
proxy_pass http://arcom_app_unicorn;
proxy_pass http://phone_app_unicorn;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@ -36,8 +36,8 @@ server {
keepalive_timeout 10;
ssl on;
ssl_certificate /etc/letsencrypt/live/arcom.basiclabs.fr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/arcom.basiclabs.fr/privkey.pem;
ssl_certificate /etc/letsencrypt/live/prestaphone.basiclabs.fr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/prestaphone.basiclabs.fr/privkey.pem;
include snippets/letsencrypt.conf;

View File

@ -1,5 +1,5 @@
defaults: &defaults
site_name: arcom_app
site_name: phone_app
dynamics_content:
contact: "Formulaire contact"
large_sub_menu: "Sous menu"

View File

@ -1,4 +1,4 @@
@rails_app = "arcom_app"
@rails_app = "phone_app"
working_directory "/srv/www/web/#{@rails_app}/current"
pid "/srv/www/web/#{@rails_app}/shared/unicorn.pid"

File diff suppressed because it is too large Load Diff

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{
"name": "arcom_app",
"name": "phone_app",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,

View File

@ -1,5 +1,5 @@
{
"name": "arcom_app",
"name": "phone_app",
"version": "1.0.0",
"description": "== README",
"main": "pdf.js",

View File

@ -1,5 +1,5 @@
{
"name": "arcom_app",
"name": "phone_app",
"private": true,
"dependencies": {
"@rails/actioncable": "^6.0.0-alpha",

BIN
public/logo-prestaphone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB