loops instance settings: fixes and improvements
This commit is contained in:
parent
2b5a5ec65a
commit
78c8b196bf
5 changed files with 19 additions and 8 deletions
|
@ -1,8 +1,8 @@
|
||||||
# py-scopes/demo/config.py
|
# loops/config.py
|
||||||
|
# (used for testing only)
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from os import getenv
|
from os import getenv
|
||||||
from scopes.server.app import zope_app_factory
|
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ server_port = getenv('SERVER_PORT', '8099')
|
||||||
app_factory = zope_app_factory
|
app_factory = zope_app_factory
|
||||||
|
|
||||||
# storage settings
|
# storage settings
|
||||||
from scopes.storage.db.postgres import StorageFactory
|
|
||||||
dbengine = 'postgresql+psycopg'
|
dbengine = 'postgresql+psycopg'
|
||||||
dbname = getenv('DBNAME', 'demo')
|
dbname = getenv('DBNAME', 'demo')
|
||||||
dbuser = getenv('DBUSER', 'demo')
|
dbuser = getenv('DBUSER', 'demo')
|
||||||
|
|
|
@ -11,7 +11,7 @@ server_port = getenv('SERVER_PORT',
|
||||||
server_id and getenv(f'SERVER_PORT_{server_id}')) or '8080'
|
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', 'loops/demo'))
|
||||||
|
|
||||||
# storage settings
|
# storage settings
|
||||||
from scopes.storage.db.postgres import StorageFactory
|
from scopes.storage.db.postgres import StorageFactory
|
||||||
|
|
13
inst/loops/env.in
Normal file
13
inst/loops/env.in
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# loops/inst/loops/.env
|
||||||
|
|
||||||
|
SERVER_ID=0
|
||||||
|
SERVER_PORT_0=8800
|
||||||
|
SERVER_PORT_1=8801
|
||||||
|
|
||||||
|
SHELL_PW=dummy
|
||||||
|
LOOPS_PATH=loops/demo
|
||||||
|
|
||||||
|
DBNAME=ccotest
|
||||||
|
DBUSER=ccotest
|
||||||
|
DBPASSWORD=cco
|
||||||
|
DBSCHEMA=loops
|
|
@ -2,7 +2,6 @@
|
||||||
set -a
|
set -a
|
||||||
|
|
||||||
# use environment variables for instance-specific configuration:
|
# use environment variables for instance-specific configuration:
|
||||||
#ZOPE_CONF=zope-1.conf
|
#SERVER_ID=0
|
||||||
#SERVER_PORT=8091
|
|
||||||
|
|
||||||
python -c "from loops.server.main import main; main()"
|
python -c "from loops.server.main import main; main()"
|
||||||
|
|
|
@ -7,8 +7,8 @@ site-definition application.zcml
|
||||||
<zodb>
|
<zodb>
|
||||||
|
|
||||||
<filestorage>
|
<filestorage>
|
||||||
path var/filestorage/Data.fs
|
path var/filestorage/Data.$(SERVER_ID).fs
|
||||||
blob-dir var/blob
|
blob-dir var/blob.$(SERVER_ID)
|
||||||
</filestorage>
|
</filestorage>
|
||||||
|
|
||||||
# Uncomment this if you want to connect to a ZEO server instead:
|
# Uncomment this if you want to connect to a ZEO server instead:
|
||||||
|
|
Loading…
Add table
Reference in a new issue