[cubicweb] use decent default values for several pillar parameters
authorDavid Douard <david.douard@logilab.fr>
Wed, 22 Jul 2015 14:51:15 +0200
changeset 58 f158714afa72
parent 57 de48682b9f7d
child 59 eecaad543f54
[cubicweb] use decent default values for several pillar parameters
cubicweb/apache/vhost.tmpl
cubicweb/instances.sls
--- a/cubicweb/apache/vhost.tmpl	Wed Jul 22 14:49:44 2015 +0200
+++ b/cubicweb/apache/vhost.tmpl	Wed Jul 22 14:51:15 2015 +0200
@@ -20,8 +20,8 @@
     </Proxy>
 {% for name, config in vhost.iteritems() %}
     Include /etc/apache2/siteconf.d/{{ vhostname }}/*.conf
-    ProxyPass {{ config.cwapp.basepath }} http://{{config.cwapp.backend}}:{{ config.cwapp.port }}/
-    ProxyPassReverse {{ config.cwapp.basepath }} http://{{ config.cwapp.backend }}:{{ config.cwapp.port }}/
+    ProxyPass {{ config.cwapp.get('basepath', '/') }} http://{{config.cwapp.backend}}:{{ config.cwapp.port }}/
+    ProxyPassReverse {{ config.cwapp.get('basepath', '/') }} http://{{ config.cwapp.backend }}:{{ config.cwapp.port }}/
 {% endfor %}
 </VirtualHost>
 
--- a/cubicweb/instances.sls	Wed Jul 22 14:49:44 2015 +0200
+++ b/cubicweb/instances.sls	Wed Jul 22 14:51:15 2015 +0200
@@ -17,17 +17,18 @@
   cubicweb_instance.present:
     - name: {{name}}
     - port: {{config.cwapp.port}}
-    - anonymous-user: {{ config.cwapp.get('anonuser') }}
-    - anonymous-password: {{ config.cwapp.get('anonpass') }}
+    - anonymous-user: {{ config.cwapp.get('anonuser', '') }}
+    - anonymous-password: {{ config.cwapp.get('anonpass', '') }}
     - admin/login: {{config.cwapp.adminuser}}
     - admin/password: {{config.cwapp.adminpass}}
     - cubes: {{config.cwapp.cubes.keys()}}
-    - db-host: {{config.database.get('host')}}
-    - db-port: {{config.database.get('port')}}
+    - db-host: {{config.database.get('host', '')}}
+    - db-port: {{config.database.get('port', '')}}
     - db-name: {{config.database.name}}
     - db-user: {{config.database.user}}
     - db-password: {{config.database.password}}
     - create_db: {{config.cwapp.get('create_db', True)}}
+    - base-url: {{config.cwapp.get('basepath', '/')}}
     - require:
       - pkg: cw-{{vhostname}}-{{name}}
   pkg.installed: