##// END OF EJS Templates
configurations: update attached configuration INI files with the ENV_ substitution infomation....
ergo -
r2986:5db0b21c default
parent child Browse files
Show More
@@ -2,7 +2,6 b''
2
2
3 ################################################################################
3 ################################################################################
4 ## RHODECODE COMMUNITY EDITION CONFIGURATION ##
4 ## RHODECODE COMMUNITY EDITION CONFIGURATION ##
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
5 ################################################################################
7
6
8 [DEFAULT]
7 [DEFAULT]
@@ -103,6 +102,11 b' use = egg:PasteDeploy#prefix'
103 prefix = /
102 prefix = /
104
103
105 [app:main]
104 [app:main]
105 ## The %(here)s variable will be replaced with the absolute path of parent directory
106 ## of this file
107 ## In addition ENVIRONMENT variables usage is possible, e.g
108 ## sqlalchemy.db1.url = {ENV_RC_DB_URL}
109
106 use = egg:rhodecode-enterprise-ce
110 use = egg:rhodecode-enterprise-ce
107
111
108 ## enable proxy prefix middleware, defined above
112 ## enable proxy prefix middleware, defined above
@@ -313,7 +317,7 b' celery.task_always_eager = false'
313 #####################################
317 #####################################
314 ## Default cache dir for caches. Putting this into a ramdisk
318 ## Default cache dir for caches. Putting this into a ramdisk
315 ## can boost performance, eg. /tmpfs/data_ramdisk, however this directory might require
319 ## can boost performance, eg. /tmpfs/data_ramdisk, however this directory might require
316 ## large ammount of space
320 ## large amount of space
317 cache_dir = %(here)s/data
321 cache_dir = %(here)s/data
318
322
319 ## `cache_perms` cache settings for permission tree, auth TTL.
323 ## `cache_perms` cache settings for permission tree, auth TTL.
@@ -353,7 +357,7 b' rc_cache.sql_cache_short.expiration_time'
353 ## `cache_repo_longterm` cache for repo object instances, this needs to use memory
357 ## `cache_repo_longterm` cache for repo object instances, this needs to use memory
354 ## type backend as the objects kept are not pickle serializable
358 ## type backend as the objects kept are not pickle serializable
355 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
359 rc_cache.cache_repo_longterm.backend = dogpile.cache.rc.memory_lru
356 # by default we use 96H, this is using invalidation on push anyway
360 ## by default we use 96H, this is using invalidation on push anyway
357 rc_cache.cache_repo_longterm.expiration_time = 345600
361 rc_cache.cache_repo_longterm.expiration_time = 345600
358 ## max items in LRU cache, reduce this number to save memory, and expire last used
362 ## max items in LRU cache, reduce this number to save memory, and expire last used
359 ## cached objects
363 ## cached objects
@@ -503,10 +507,7 b' appenlight.log_namespace_blacklist ='
503 ################################################################################
507 ################################################################################
504 #set debug = false
508 #set debug = false
505
509
506
510 # enable debug style page
507 ##############
508 ## STYLING ##
509 ##############
510 debug_style = true
511 debug_style = true
511
512
512 ###########################################
513 ###########################################
@@ -565,7 +566,7 b' vcs.hooks.protocol = http'
565 vcs.hooks.host = 127.0.0.1
566 vcs.hooks.host = 127.0.0.1
566
567
567 vcs.server.log_level = debug
568 vcs.server.log_level = debug
568 ## Start VCSServer with this instance as a subprocess, usefull for development
569 ## Start VCSServer with this instance as a subprocess, useful for development
569 vcs.start_server = false
570 vcs.start_server = false
570
571
571 ## List of enabled VCS backends, available options are:
572 ## List of enabled VCS backends, available options are:
@@ -2,7 +2,6 b''
2
2
3 ################################################################################
3 ################################################################################
4 ## RHODECODE COMMUNITY EDITION CONFIGURATION ##
4 ## RHODECODE COMMUNITY EDITION CONFIGURATION ##
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
5 ################################################################################
7
6
8 [DEFAULT]
7 [DEFAULT]
@@ -103,6 +102,11 b' use = egg:PasteDeploy#prefix'
103 prefix = /
102 prefix = /
104
103
105 [app:main]
104 [app:main]
105 ## The %(here)s variable will be replaced with the absolute path of parent directory
106 ## of this file
107 ## In addition ENVIRONMENT variables usage is possible, e.g
108 ## sqlalchemy.db1.url = {ENV_RC_DB_URL}
109
106 use = egg:rhodecode-enterprise-ce
110 use = egg:rhodecode-enterprise-ce
107
111
108 ## enable proxy prefix middleware, defined above
112 ## enable proxy prefix middleware, defined above
@@ -540,10 +540,17 b' def _string_setting(settings, name, defa'
540
540
541
541
542 def _substitute_values(mapping, substitutions):
542 def _substitute_values(mapping, substitutions):
543
544 try:
543 result = {
545 result = {
544 # Note: Cannot use regular replacements, since they would clash
546 # Note: Cannot use regular replacements, since they would clash
545 # with the implementation of ConfigParser. Using "format" instead.
547 # with the implementation of ConfigParser. Using "format" instead.
546 key: value.format(**substitutions)
548 key: value.format(**substitutions)
547 for key, value in mapping.items()
549 for key, value in mapping.items()
548 }
550 }
551 except KeyError as e:
552 raise ValueError(
553 'Failed to substitute env variable: {}. '
554 'Make sure you have specified this env variable without ENV_ prefix'.format(e))
555
549 return result
556 return result
General Comments 0
You need to be logged in to leave comments. Login now