detect staging env
This commit is contained in:
parent
db7603efb7
commit
83cf0fa903
4 changed files with 6 additions and 8 deletions
|
@ -110,7 +110,7 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def staging?
|
def staging?
|
||||||
ENV['APP_NAME'] == 'tps_dev'
|
Rails.application.config.ds_env == 'staging'
|
||||||
end
|
end
|
||||||
|
|
||||||
def contact_link(title, options = {})
|
def contact_link(title, options = {})
|
||||||
|
|
|
@ -73,7 +73,9 @@ module TPS
|
||||||
config.middleware.use Rack::Attack
|
config.middleware.use Rack::Attack
|
||||||
config.middleware.use Flipper::Middleware::Memoizer, preload_all: true
|
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 = {
|
config.ds_autosave = {
|
||||||
debounce_delay: 3000,
|
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
|
# Nom d'hôte de l'appli
|
||||||
# * Pour du dev local: localhost:3000
|
# * Pour du dev local: localhost:3000
|
||||||
# * pour de la preprod: preprod.ds.organisme.fr (par exemple)
|
# * 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_SHORTNAME="d-s.fr"
|
||||||
APPLICATION_BASE_URL="https://www.demarches-simplifiees.fr"
|
APPLICATION_BASE_URL="https://www.demarches-simplifiees.fr"
|
||||||
|
|
||||||
|
DS_ENV="staging"
|
||||||
|
|
||||||
# Utilisation de France Connect
|
# Utilisation de France Connect
|
||||||
# FRANCE_CONNECT_ENABLED="disabled" # "enabled" par défaut
|
# FRANCE_CONNECT_ENABLED="disabled" # "enabled" par défaut
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue