add SERVER_ID to instance config

This commit is contained in:
Helmut Merz 2024-12-18 11:33:23 +01:00
parent b8ce799b12
commit 2b5a5ec65a
2 changed files with 7 additions and 5 deletions

View file

@ -5,8 +5,10 @@ from os import getenv
load_dotenv() load_dotenv()
server_id = getenv('SERVER_ID')
zope_conf = getenv('ZOPE_CONF', 'zope.conf') zope_conf = getenv('ZOPE_CONF', 'zope.conf')
server_port = getenv('SERVER_PORT', '8099') server_port = getenv('SERVER_PORT',
server_id and getenv(f'SERVER_PORT_{server_id}')) or '8080'
shell_pw = (getenv('SHELL_PW', 'dummy')) shell_pw = (getenv('SHELL_PW', 'dummy'))
loops_path = (getenv('LOOPS_PATH', None)) loops_path = (getenv('LOOPS_PATH', None))

View file

@ -13,12 +13,12 @@ site-definition application.zcml
# Uncomment this if you want to connect to a ZEO server instead: # Uncomment this if you want to connect to a ZEO server instead:
# <zeoclient> # <zeoclient>
# server localhost:8100 # server $(ZEO_SERVER)
# storage 1 # storage 1
# # ZEO client cache, in bytes # # ZEO client cache, in bytes
# cache-size 20MB # cache-size $(ZEO_CACHE_SIZE)
# # Uncomment to have a persistent disk cache # # Uncomment to have a persistent disk cache
# #client zeo1 # #client zeo1$(SERVER_ID)
# </zeoclient> # </zeoclient>
</zodb> </zodb>
@ -28,7 +28,7 @@ site-definition application.zcml
# the tokens STDOUT or STDERR. # the tokens STDOUT or STDERR.
<logfile> <logfile>
path var/log/z3-deploy.log path var/log/loops-$(SERVER_ID).log
formatter zope.exceptions.log.Formatter formatter zope.exceptions.log.Formatter
</logfile> </logfile>