From 6509f34e8ebdac1c0d685a9f8acaa31d2c99c293 Mon Sep 17 00:00:00 2001 From: Florent Peyraud Date: Thu, 6 Jul 2017 15:54:35 +0200 Subject: improve packaging --- config/environments/production.rb | 18 ++++++++++++++++++ lib/tasks/install.rake | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/config/environments/production.rb b/config/environments/production.rb index 41b31b1e8..19fc23024 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -111,6 +111,16 @@ Rails.application.configure do # config.company_contact = "http://www.cityway.fr/contact/?rub_code=14" # config.accept_user_creation = false + config.chouette_authentication_settings = { + type: "cas", + cas_server: "https://portail-server/sessions", + cas_validate_url: "http://portail-server/sessions/proxyValidate" + } + config.stif_portail_api = { + key: "api_token_for_portail_goes_here", + url: "http://portail-server" + } + # file to data for demo # config.demo_data = "/path/to/demo.zip" @@ -124,6 +134,14 @@ Rails.application.configure do config.i18n.available_locales = [:fr, :en] + # REFLEX api url + config.reflex_api_url = "https://pprod.reflex.stif.info/ws/reflex/V1/service=getData" + # CODIFLIGNE api url + config.codifligne_api_url = "https://pprod.codifligne.stif.info/rest/v1/lc/getlist" + + # IEV + config.iev_url = "http://worker-server:8080" + # Set node env for browserify-rails config.browserify_rails.node_env = "production" end diff --git a/lib/tasks/install.rake b/lib/tasks/install.rake index f32f3f240..5e41fa2af 100644 --- a/lib/tasks/install.rake +++ b/lib/tasks/install.rake @@ -7,12 +7,16 @@ task :package do sh "git archive --format=tar --output=tmp/package/stif-boiv-release-#{release_name}.tar HEAD" sh "bundle package --all" + sh "bundle exec rake assets:clobber RAILS_ENV=production" + sh "bundle exec rake assets:precompile RAILS_ENV=production" sh "tar -rf tmp/package/stif-boiv-release-#{release_name}.tar vendor/cache" %w{deploy-helper.sh README sidekiq-stif-boiv.service stif-boiv.conf stif-boiv-setup.sh template-stif-boiv.sql}.each do |f| cp "install/#{f}", "tmp/package/#{f}" end + cp "config/environments/production.rb", "tmp/package/production.rb" + sh "tar -czf stif-boiv-#{release_name}.tar.gz -C tmp/package ." sh "rm -rf tmp/package vendor/cache" end -- cgit v1.2.3