Commit 8b5ff33f authored by Tristan Cavelier's avatar Tristan Cavelier

cloudooo: add mimetype entry addition parameter

parent 2025705b
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
"type": "string" "type": "string"
} }
} }
},
"mimetype-entry-addition": {
"description": "The list of entry to add to the cloudooo mimetype registry. Each entry should on one line which format is: \"<source_mimetype> <destination_mimetype> <handler>\"",
"type": "string"
} }
} }
} }
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
{% set ssl_parameter_dict = slapparameter_dict.get(instance_parameter_dict['ssl-dict-parameter-name'], ssl_parameter_dict) -%} {% set ssl_parameter_dict = slapparameter_dict.get(instance_parameter_dict['ssl-dict-parameter-name'], ssl_parameter_dict) -%}
{% endif -%} {% endif -%}
{% set mimetype_entry_addition = instance_parameter_dict.get('mimetype-entry-addition', '') -%}
{% if instance_parameter_dict.get('mimetype-entry-addition-parameter-name') -%}
{% set mimetype_entry_addition = mimetype_entry_addition ~ "\n" ~ slapparameter_dict.get(instance_parameter_dict['mimetype-entry-addition-parameter-name'], '') -%}
{% endif -%}
{% set apache_port = next_port -%} {% set apache_port = next_port -%}
{% set haproxy_port = next_port + 1 -%} {% set haproxy_port = next_port + 1 -%}
{% set next_port = next_port + 2 -%} {% set next_port = next_port + 2 -%}
...@@ -151,7 +156,9 @@ environment = ...@@ -151,7 +156,9 @@ environment =
FONTCONFIG_FILE = ${fontconfig-instance:conf-path} FONTCONFIG_FILE = ${fontconfig-instance:conf-path}
PATH = ${binary-link:target-directory} PATH = ${binary-link:target-directory}
mimetype_entry_addition = mimetype_entry_addition =
text/html application/pdf wkhtmltopdf {% for entry in mimetype_entry_addition.splitlines() -%}
{{ " " ~ entry.strip() }}
{% endfor -%}
# Binary information # Binary information
# cloudooo specific configuration # cloudooo specific configuration
ooo-binary-path = {{ parameter_dict['libreoffice-bin'] }}/program ooo-binary-path = {{ parameter_dict['libreoffice-bin'] }}/program
......
...@@ -6,6 +6,9 @@ backend-count-parameter-name = backend-count ...@@ -6,6 +6,9 @@ backend-count-parameter-name = backend-count
backend-count = 1 backend-count = 1
ssl-dict-parameter-name = ssl ssl-dict-parameter-name = ssl
#ssl-dict = #ssl-dict =
mimetype-entry-addition-parameter-name = mimetype-entry-addition
mimetype-entry-addition =
text/html application/pdf wkhtmltopdf
[buildout] [buildout]
...@@ -96,5 +99,5 @@ extra-context = ...@@ -96,5 +99,5 @@ extra-context =
[template-cloudooo] [template-cloudooo]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = 5e8fb5070c873f8405ba72573a68854f md5sum = b23e68b3b76b7e7cba8df3a6c1dd5b4c
mode = 640 mode = 640
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