-
Notifications
You must be signed in to change notification settings - Fork 32
/
docker-compose-odoo.yml
159 lines (149 loc) · 6.24 KB
/
docker-compose-odoo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
services:
# Odoo
odoo:
depends_on:
postgresql:
condition: service_healthy
environment:
- HOST=${POSTGRES_DB_HOST}
- USER=${ODOO_DB_USER}
- PASSWORD=${ODOO_DB_PASSWORD}
- ADDONS=sale_management,stock,account_account,purchase,mrp,odoo_initializer,ozone_settings,mrp_product_expiry,product_expiry,l10n_generic_coa
- INITIALIZER_DATA_FILES_PATH=/mnt/odoo_config
- INITIALIZER_CONFIG_FILE_PATH=/mnt/odoo_config/initializer_config.json
image: mekomsolutions/odoo
labels:
traefik.enable: true
# https
traefik.http.routers.odoo-https.rule: Host(`${ODOO_HOSTNAME}`)
traefik.http.routers.odoo-https.entrypoints: websecure
traefik.http.routers.odoo-https.service: odoo
traefik.http.routers.odoo-https.middlewares: gzip,sslheader,limit
#----------------------------- routes for: odoo/web/database || odoo/website/info -----------------------------
# https
traefik.http.routers.odoo-db-https.rule: Host(`${ODOO_HOSTNAME}`) && (PathPrefix(`/web/database`) || PathPrefix(`/website/info`))
traefik.http.routers.odoo-db-https.entrypoints: websecure
traefik.http.routers.odoo-db-https.service: odoo
traefik.http.routers.odoo-db-https.middlewares: gzip,sslheader,limit
traefik.http.services.odoo-db-https.loadbalancer.server.port: 8069
#---------------------------------------- routes for: odoo/longpolling ------------------------------------------------
# https
traefik.http.routers.odoo-im-https.rule: Host(`${ODOO_HOSTNAME}`) && (PathPrefix(`/longpolling`))
traefik.http.routers.odoo-im-https.entrypoints: websecure
traefik.http.routers.odoo-im-https.service: odoo-im
traefik.http.routers.odoo-im-https.middlewares: gzip,sslheader,limit
#====================================================== services ===========================================================
traefik.http.services.odoo.loadbalancer.server.port: 8069
traefik.http.services.odoo-im.loadbalancer.server.port: 8072
#===================================================== middlewares =========================================================
traefik.http.middlewares.gzip.compress: true
traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto: https
traefik.http.middlewares.limit.buffering.memRequestBodyBytes: 20971520
traefik.http.middlewares.limit.buffering.maxRequestBodyBytes: 20971520
#=====================================================backup================================================================
restic-compose-backup.volumes: true
restic-compose-backup.volumes.include: "${ODOO_FILESTORE:-odoo-filestore},${ODOO_CONFIG_CHECKSUMS_PATH:-odoo-checksums}"
networks:
- ozone
- web
restart: unless-stopped
volumes:
- "${ODOO_FILESTORE:-odoo-filestore}:/var/lib/odoo/filestore"
- "${ODOO_EXTRA_ADDONS:-odoo-extra-addons}:/mnt/extra-addons"
- "${ODOO_CONFIG_PATH:-odoo-config}:/mnt/odoo_config"
- "${ODOO_CONFIG_FILE_PATH:-odoo-config}:/etc/properties/odoo.conf"
- "${ODOO_CONFIG_CHECKSUMS_PATH:-odoo-checksums}:/mnt/checksums"
# Odoo - OpenMRS integration service
eip-odoo-openmrs:
depends_on:
env-substitution:
condition: service_completed_successfully
openmrs:
condition: service_healthy
mysql:
condition: service_started
odoo:
condition: service_started
environment:
- EIP_DB_NAME_ODOO=${EIP_DB_NAME_ODOO}
- EIP_DB_USER_ODOO=${EIP_DB_USER_ODOO}
- EIP_DB_PASSWORD_ODOO=${EIP_DB_PASSWORD_ODOO}
- ODOO_DATABASE=${ODOO_DATABASE}
- ODOO_USER=${ODOO_USER}
- ODOO_PASSWORD=${ODOO_PASSWORD}
- ODOO_URL=http://odoo:8069
- OPENMRS_URL=http://openmrs:8080/openmrs
- EIP_PROFILE=prod
- MYSQL_ADMIN_USER=root
- MYSQL_ADMIN_USER_PASSWORD=${MYSQL_ROOT_PASSWORD}
- OPENMRS_DB_HOST=${OPENMRS_DB_HOST}
- OPENMRS_DB_PORT=${OPENMRS_DB_PORT}
- OPENMRS_DB_NAME=${OPENMRS_DB_NAME}
- OPENMRS_DB_USER=${OPENMRS_DB_USER}
- OPENMRS_DB_PASSWORD=${OPENMRS_DB_PASSWORD}
- OPENMRS_USER=${OPENMRS_USER}
- OPENMRS_PASSWORD=${OPENMRS_PASSWORD}
- EIP_FHIR_RESOURCES=Patient,ServiceRequest,MedicationRequest
- EIP_FHIR_SERVER_URL=http://openmrs:8080/openmrs/ws/fhir2/R4
- EIP_FHIR_USERNAME=${OPENMRS_USER}
- EIP_FHIR_PASSWORD=${OPENMRS_PASSWORD}
image: mekomsolutions/eip-client
networks:
ozone:
aliases:
- eip-client-odoo
- eip-odoo-openmrs
restart: unless-stopped
volumes:
- "${EIP_ODOO_OPENMRS_ROUTES_PATH}:/eip-client/routes"
- eip-home-odoo:/eip-home
fhir-odoo:
depends_on:
env-substitution:
condition: service_completed_successfully
odoo:
condition: service_started
environment:
- ODOO_HOST=http://odoo
- ODOO_PORT=8069
- ODOO_DATABASE=${ODOO_DATABASE}
image: mekomsolutions/fhir-odoo
labels:
traefik.enable: "true"
traefik.http.routers.fhir-erp.rule: "Host(`${FHIR_ODOO_HOSTNAME}`)"
traefik.http.routers.fhir-erp.entrypoints: "websecure"
traefik.http.services.fhir-erp.loadbalancer.server.port: 8080
networks:
ozone:
aliases:
- fhir-erp
- fhir-odoo
- odoo-fhir-facade
restart: unless-stopped
postgresql:
environment:
ODOO_DB_NAME: ${ODOO_DATABASE}
ODOO_DB_USER: ${ODOO_DB_USER}
ODOO_DB_PASSWORD: ${ODOO_DB_PASSWORD}
volumes:
- "${SQL_SCRIPTS_PATH}/postgresql/odoo:/docker-entrypoint-initdb.d/db/odoo"
mysql:
environment:
EIP_DB_NAME_ODOO: ${EIP_DB_NAME_ODOO}
EIP_DB_USER_ODOO: ${EIP_DB_USER_ODOO}
EIP_DB_PASSWORD_ODOO: ${EIP_DB_PASSWORD_ODOO}
volumes:
- "${SQL_SCRIPTS_PATH}/mysql/eip-odoo-openmrs:/docker-entrypoint-initdb.d/db/eip-odoo-openmrs"
env-substitution:
environment:
- ODOO_PUBLIC_URL=${SERVER_SCHEME}://${ODOO_HOSTNAME}
- EXTERNAL_FHIR_API_URL=http://fhir-odoo:8080/odoo/fhir/R4
- EXTERNAL_FHIR_API_USERNAME=${ODOO_USER}
- EXTERNAL_FHIR_API_PASSWORD=${ODOO_PASSWORD}
volumes:
eip-home-odoo: ~
odoo-checksums: ~
odoo-config: ~
odoo-extra-addons: ~
odoo-filestore: ~
odoo-web-data: ~