Docker¶
Dockerfile
Start the service using docker
docker pull tlemane/kmviz:latest
docker run -d --network="host" -v.:/home/ tlemane/kmviz -w 1 -u 0.0.0.0 -p 8000
-
Docker Options
--network="host"
: Use the host network-p .:/home/
: Mount.
at/home/
-d
: Detach the container
-
Server Options (See
kmviz app deploy
)-w
: The number of workers-u
: Host-p
: Port
By default, KMVIZ_CONF
is set to /home/config.toml
. To use another filename, use docker run --env KMVIZ_CONF=/home/my_config.yaml ...
.
About cache¶
3 caching systems are used in kmviz:
manager
: For Background callback supportserverside
: For Serverside output supportresult
: Store user sessions
serverside
and result
configuration¶
Available backends
disk
, based on cachelib.FileSystemCacheredis
, based on cachelib.RedisCache
Note
redis
is recommended for both serverside
and result
when deploying multi-user instances.
About timeout
result
: Thedefault_timeout
field corresponds the time during which a user can access a result without recomputing the query.serverside
: The cache should always return and value, i.e. keys should not expire during a user session. Use a significant value, e.g. 24 hours.
manager
configuration¶
Available backends
disk
, based on DiskCache.Cachefanout
, based on DiskCache.FanoutCache ( coming soon)celery
, based on Celery ( coming soon)
Complete example¶
config.toml
[cache]
[cache.serverside]
type = "redis"
[cache.serverside.params]
host = "localhost"
port = 6379
db = 0
default_timeout = 86400
[cache.manager]
type = "disk"
params.directory = "./kmviz_manager_cache"
[cache.result]
type = "disk"
[cache.result.params]
cache_dir = "./kmviz_result_cache"
threshold = 0
default_timeout = 1209600