forked from 0k/0k-charms
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
2.9 KiB
95 lines
2.9 KiB
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
|
|
|
|
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=$(relation-base-compose-get version 2>/dev/null)
|
|
if [ "$workers" -gt 1 ] && [ $version -lt 16]; then
|
|
echo "ProxyPass /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/"
|
|
echo "ProxyPassReverse /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/"
|
|
fi
|
|
if [ "$workers" -gt 1 ] && [ $version -ge 16]; then
|
|
echo "ProxyPass /websocket/ http://${MASTER_BASE_SERVICE_NAME}:8072/websocket/"
|
|
echo "ProxyPassReverse /websocket/ http://${MASTER_BASE_SERVICE_NAME}:8072/websocket/"
|
|
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
|