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.

91 lines
2.5 KiB

  1. docker-image: docker.0k.io/mirror/odoo:rc_12.0-MYC-INIT-3.7
  2. data-resources:
  3. - /var/lib/odoo
  4. # config-resources:
  5. # ## XXXvlab: should this be there or declared dynamically in the relation that
  6. # ## create/update this file ?
  7. # # - /etc/odoo-server.conf
  8. docker-compose:
  9. command:
  10. - odoo
  11. - --config=/opt/odoo/auto/odoo.conf
  12. ## YYYvlab: useful ?
  13. tty: true
  14. environment:
  15. INITIAL_LANG: fr_FR
  16. LIST_DB: 'true'
  17. default-options:
  18. workers: 1
  19. # modules:
  20. # - l10n_fr
  21. #database: MYDATABASE ## will be the one connected to postgres
  22. ## Adds custom values in options
  23. # conf:
  24. # options:
  25. # email_from: xxxx
  26. # othersection:
  27. # myvalue: yyy
  28. provides:
  29. odoo-server:
  30. uses:
  31. postgres-database:
  32. #constraint: required | recommended | optional
  33. #auto: pair | summon | none ## default: pair
  34. constraint: required
  35. auto: summon
  36. solves:
  37. database: "main storage"
  38. default-options:
  39. extensions:
  40. - unaccent
  41. log-rotate:
  42. #constraint: required | recommended | optional
  43. #auto: pair | summon | none ## default: pair
  44. constraint: recommended
  45. auto: pair
  46. solves:
  47. unmanaged-logs: "in docker logs"
  48. #default-options:
  49. web-proxy:
  50. #constraint: required | recommended | optional
  51. #auto: pair | summon | none ## default: pair
  52. constraint: recommended
  53. auto: pair
  54. solves:
  55. proxy: "Public access"
  56. default-options:
  57. target: !var-expand ${MASTER_BASE_SERVICE_NAME}:8069
  58. apache-custom-rules:
  59. - !bash-stdout |
  60. workers=$(relation-base-compose-get workers 2>/dev/null)
  61. workers=${workers:-1}
  62. if [ "$workers" -gt 1 ]; then
  63. echo "ProxyPass /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/"
  64. echo "ProxyPassReverse /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/"
  65. fi
  66. backup:
  67. constraint: recommended
  68. auto: pair
  69. solves:
  70. backup: "Automatic regular backup"
  71. default-options:
  72. ## First pattern matching wins, no pattern matching includes.
  73. ## include-patterns are checked first, then exclude-patterns
  74. ## Patterns rules:
  75. ## - ending / for directory
  76. ## - '*' authorized
  77. ## - must start with a '/', will start from $SERVICE_DATASTORE
  78. exclude-patterns:
  79. - "/var/lib/odoo/sessions/"
  80. # network-isolation:
  81. # whitelist: ## required external services used by this service
  82. # - www.google.com
  83. # - www.gravatar.com
  84. # - fonts.gstatic.com
  85. # - fonts.googleapis.com
  86. # - cdnjs.cloudflare.com