fixes for server start functionality and inst examples
This commit is contained in:
parent
dc87e32a63
commit
cfa079de0d
5 changed files with 9 additions and 6 deletions
|
@ -9,7 +9,7 @@ zope_conf = getenv('ZOPE_CONF', 'zope.conf')
|
||||||
server_port = getenv('SERVER_PORT', '8099')
|
server_port = getenv('SERVER_PORT', '8099')
|
||||||
|
|
||||||
shell_pw = (getenv('SHELL_PW', 'dummy'))
|
shell_pw = (getenv('SHELL_PW', 'dummy'))
|
||||||
|
loops_path = (getenv('LOOPS_PATH', None))
|
||||||
|
|
||||||
# storage settings
|
# storage settings
|
||||||
from scopes.storage.db.postgres import StorageFactory
|
from scopes.storage.db.postgres import StorageFactory
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# inst/loops/runserver.sh
|
# inst/loops/runserver.sh
|
||||||
|
set -a
|
||||||
|
|
||||||
# use environment variables for instance-specific configuration:
|
# use environment variables for instance-specific configuration:
|
||||||
#ZOPE_CONF=zope.conf
|
#ZOPE_CONF=zope-1.conf
|
||||||
#SERVER_PORT=8099
|
#SERVER_PORT=8091
|
||||||
|
|
||||||
python -c "from loops.server.main import main; main()"
|
python -c "from loops.server.main import main; main()"
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# inst/loops/zshell.sh
|
# inst/loops/zshell.sh
|
||||||
|
set -a
|
||||||
|
|
||||||
# use environment variables for instance-specific configuration:
|
# use environment variables for instance-specific configuration:
|
||||||
#ZOPE_CONF=zope.conf
|
#ZOPE_CONF=zope-1.conf
|
||||||
#LOOPS_PATH=sites/mysite
|
#LOOPS_PATH=sites/mysite
|
||||||
|
|
||||||
python -ic "from loops.server import psu; psu.setup()"
|
python -ic "from loops.server import psu; psu.setup()"
|
||||||
|
|
|
@ -19,7 +19,8 @@ def run(app, config):
|
||||||
def main():
|
def main():
|
||||||
import config
|
import config
|
||||||
zope_conf = getattr(config, 'zope_conf', 'zope.conf')
|
zope_conf = getattr(config, 'zope_conf', 'zope.conf')
|
||||||
app = getWSGIApplication('zope.conf')
|
print(f'starting loops server... - conf: {zope_conf}')
|
||||||
|
app = getWSGIApplication(zope_conf)
|
||||||
run(app, config)
|
run(app, config)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -50,7 +50,7 @@ def closeConnection():
|
||||||
print('closing ZODB connection...')
|
print('closing ZODB connection...')
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
def setup(zope_conf=None, loopsRootPath='sites/loops', config=config):
|
def setup(zope_conf=None, loopsRootPath=None, config=config):
|
||||||
if zope_conf is None:
|
if zope_conf is None:
|
||||||
zope_conf = getattr(config, 'zope_conf', 'zope.conf')
|
zope_conf = getattr(config, 'zope_conf', 'zope.conf')
|
||||||
if loopsRootPath is None:
|
if loopsRootPath is None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue