Merge pull request #6016 from betagouv/5493-detect-staging
detect staging env
This commit is contained in:
commit
8e1569a658
4 changed files with 6 additions and 8 deletions
|
@ -110,7 +110,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def staging?
|
||||
ENV['APP_NAME'] == 'tps_dev'
|
||||
Rails.application.config.ds_env == 'staging'
|
||||
end
|
||||
|
||||
def contact_link(title, options = {})
|
||||
|
|
|
@ -73,7 +73,9 @@ module TPS
|
|||
config.middleware.use Rack::Attack
|
||||
config.middleware.use Flipper::Middleware::Memoizer, preload_all: true
|
||||
|
||||
config.ds_weekly_overview = ENV['APP_NAME'] == 'tps'
|
||||
config.ds_env = ENV.fetch('DS_ENV', Rails.env)
|
||||
|
||||
config.ds_weekly_overview = Rails.env.production? && config.ds_env != 'staging'
|
||||
|
||||
config.ds_autosave = {
|
||||
debounce_delay: 3000,
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
# 3 valeurs:
|
||||
# * tps: environnement de production
|
||||
# * tps_dev: environnement de pre-production
|
||||
# * tps_local: machine de développeur
|
||||
APP_NAME="tps_local"
|
||||
|
||||
# Nom d'hôte de l'appli
|
||||
# * Pour du dev local: localhost:3000
|
||||
# * pour de la preprod: preprod.ds.organisme.fr (par exemple)
|
||||
|
|
|
@ -6,6 +6,8 @@ APPLICATION_NAME="demarches-simplifiees.fr"
|
|||
APPLICATION_SHORTNAME="d-s.fr"
|
||||
APPLICATION_BASE_URL="https://www.demarches-simplifiees.fr"
|
||||
|
||||
DS_ENV="staging"
|
||||
|
||||
# Utilisation de France Connect
|
||||
# FRANCE_CONNECT_ENABLED="disabled" # "enabled" par défaut
|
||||
|
||||
|
|
Loading…
Reference in a new issue