docker-image: docker.0k.io/mirror/odoo:rc_12.0-MYC-INIT-3.7 data-resources: - /var/lib/odoo # config-resources: # ## XXXvlab: should this be there or declared dynamically in the relation that # ## create/update this file ? # # - /etc/odoo-server.conf charm-resources: - /opt/odoo/common/entrypoint.d/20-postgres-wait docker-compose: command: - odoo - --config=/opt/odoo/auto/odoo.conf ## YYYvlab: useful ? tty: true environment: INITIAL_LANG: fr_FR LIST_DB: 'true' default-options: workers: 1 # modules: # - l10n_fr #database: MYDATABASE ## will be the one connected to postgres ## Adds custom values in options # conf: # options: # email_from: xxxx # othersection: # myvalue: yyy provides: odoo-server: uses: postgres-database: #constraint: required | recommended | optional #auto: pair | summon | none ## default: pair constraint: required auto: summon solves: database: "main storage" default-options: extensions: - unaccent log-rotate: #constraint: required | recommended | optional #auto: pair | summon | none ## default: pair constraint: recommended auto: pair solves: unmanaged-logs: "in docker logs" #default-options: web-proxy: #constraint: required | recommended | optional #auto: pair | summon | none ## default: pair constraint: recommended auto: pair solves: proxy: "Public access" default-options: target: !var-expand ${MASTER_BASE_SERVICE_NAME}:8069 apache-custom-rules: - !bash-stdout | workers=$(relation-base-compose-get workers 2>/dev/null) workers=${workers:-1} version=$(cached_cmd_on_base_image "$MASTER_BASE_SERVICE_NAME" \ "python -c 'import odoo; print(odoo.cli.server.__version__)'") || exit 1 if [ "$workers" -gt 1 ]; then if [ "${version%.*}" -lt 16 ]; then echo "ProxyPass /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" echo "ProxyPassReverse /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" else echo "ProxyPass /websocket ws://${MASTER_BASE_SERVICE_NAME}:8072/websocket" echo "ProxyPassReverse /websocket ws://${MASTER_BASE_SERVICE_NAME}:8072/websocket" fi fi backup: constraint: recommended auto: pair solves: backup: "Automatic regular backup" default-options: ## First pattern matching wins, no pattern matching includes. ## include-patterns are checked first, then exclude-patterns ## Patterns rules: ## - ending / for directory ## - '*' authorized ## - must start with a '/', will start from $SERVICE_DATASTORE exclude-patterns: - "/var/lib/odoo/sessions/" # network-isolation: # whitelist: ## required external services used by this service # - www.google.com # - www.gravatar.com # - fonts.gstatic.com # - fonts.googleapis.com # - cdnjs.cloudflare.com