Commit 2a35ce1d authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[doc/book/admin] initial version of deploy cubicweb page in documentation

branch : 3.27
parent 1983923e51cc
.. -*- coding: utf-8 -*-
Deploy a *CubicWeb* application
Deployment with uwsgi
`uWSGI <>`_ is often used to deploy CubicWeb
Short version is install `uwsgi`:
.. sourcecode:: console
apt install uwsgi
Deploy a configuration file for your application
.. sourcecode:: ini
master = true
http =
env = CW_INSTANCE=example
wsgi-file = /etc/cubicweb.d/example/
processes = 8
threads = 1
plugins = http,python3
auto-procname = true
lazy-apps = true
log-master = true
# disable uwsgi request logging
disable-logging = true
stats =
The `` file looks like this:
.. sourcecode:: python
import os
from cubicweb.pyramid import wsgi_application_from_cwconfig
from cubicweb.cwconfig import CubicWebConfiguration as cwcfg
appid = os.environ['CW_INSTANCE'] # instance name
cwconfig = cwcfg.config_for(appid)
cwconfig.log_format = ('{0} pid:{1} (%(name)s) %(levelname)s: %(message)s'
.format(appid, os.getpid()))
application = wsgi_application_from_cwconfig(cwconfig)
repo = application.application.registry['cubicweb.repository']
Deployment with SaltStack
To deploy with SaltStack one can refer themselves to the
`cubicweb-formula <>`_.
Deployment with Kubernetes
To deploy in a Kubernetes cluster, you can take inspiration from the
instructions included in
`the fresh cube <>`_
and the `deployment yaml files <>`_.
......@@ -14,6 +14,7 @@ instances based on that framework.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment