cwconfig.py
changeset 6397 66401ba9332a
parent 6192 80388edf4e88
child 6494 70c87c717e4a
equal deleted inserted replaced
6396:a9e4c51fc1c1 6397:66401ba9332a
    24 
    24 
    25 A resource *mode* is a predifined set of settings for various resources
    25 A resource *mode* is a predifined set of settings for various resources
    26 directories, such as cubes, instances, etc. to ease development with the
    26 directories, such as cubes, instances, etc. to ease development with the
    27 framework. There are two running modes with *CubicWeb*:
    27 framework. There are two running modes with *CubicWeb*:
    28 
    28 
    29 * 'user', resources are searched / created in the user home directory:
    29 * **system**: resources are searched / created in the system directories (eg
       
    30   usually requiring root access):
       
    31 
       
    32   - instances are stored in :file:`<INSTALL_PREFIX>/etc/cubicweb.d`
       
    33   - temporary files (such as pid file) in :file:`/var/run/cubicweb`
       
    34 
       
    35   where `<INSTALL_PREFIX>` is the detected installation prefix ('/usr/local' for
       
    36   instance).
       
    37 
       
    38 * **user**: resources are searched / created in the user home directory:
    30 
    39 
    31   - instances are stored in :file:`~/etc/cubicweb.d`
    40   - instances are stored in :file:`~/etc/cubicweb.d`
    32   - temporary files (such as pid file) in :file:`/tmp`
    41   - temporary files (such as pid file) in :file:`/tmp`
    33 
    42 
    34 * 'system', resources are searched / created in the system directories (eg
       
    35   usually requiring root access):
       
    36 
       
    37   - instances are stored in :file:`<INSTALL_PREFIX>/etc/cubicweb.d`
       
    38   - temporary files (such as pid file) in :file:`/var/run/cubicweb`
       
    39 
       
    40   where `<INSTALL_PREFIX>` is the detected installation prefix ('/usr/local' for
       
    41   instance).
       
    42 
    43 
    43 
    44 
    44 Notice that each resource path may be explicitly set using an environment
    45 Notice that each resource path may be explicitly set using an environment
    45 variable if the default doesn't suit your needs. Here are the default resource
    46 variable if the default doesn't suit your needs. Here are the default resource
    46 directories that are affected according to mode:
    47 directories that are affected according to mode:
    47 
    48 
    48 * 'system': ::
    49 * **system**: ::
    49 
    50 
    50         CW_INSTANCES_DIR = <INSTALL_PREFIX>/etc/cubicweb.d/
    51         CW_INSTANCES_DIR = <INSTALL_PREFIX>/etc/cubicweb.d/
    51         CW_INSTANCES_DATA_DIR = /var/lib/cubicweb/instances/
    52         CW_INSTANCES_DATA_DIR = /var/lib/cubicweb/instances/
    52         CW_RUNTIME_DIR = /var/run/cubicweb/
    53         CW_RUNTIME_DIR = /var/run/cubicweb/
    53 
    54 
    54 * 'user': ::
    55 * **user**: ::
    55 
    56 
    56         CW_INSTANCES_DIR = ~/etc/cubicweb.d/
    57         CW_INSTANCES_DIR = ~/etc/cubicweb.d/
    57         CW_INSTANCES_DATA_DIR = ~/etc/cubicweb.d/
    58         CW_INSTANCES_DATA_DIR = ~/etc/cubicweb.d/
    58         CW_RUNTIME_DIR = /tmp
    59         CW_RUNTIME_DIR = /tmp
    59 
    60 
    60 Cubes search path is also affected, see the :ref:Cube section.
    61 Cubes search path is also affected, see the :ref:`Cube` section.
    61 
    62 
    62 By default, the mode automatically set to 'user' if a :file:`.hg` directory is found
    63 By default, the mode automatically set to `user` if a :file:`.hg` directory is found
    63 in the cubicweb package, else it's set to 'system'. You can force this by setting
    64 in the cubicweb package, else it's set to `system`. You can force this by setting
    64 the :envvar:`CW_MODE` environment variable to either 'user' or 'system' so you can
    65 the :envvar:`CW_MODE` environment variable to either `user` or `system` so you can
    65 easily:
    66 easily:
    66 
    67 
    67 * use system wide installation but user specific instances and all, without root
    68 * use system wide installation but user specific instances and all, without root
    68   privileges on the system (`export CW_MODE=user`)
    69   privileges on the system (`export CW_MODE=user`)
    69 
    70