-
-
Notifications
You must be signed in to change notification settings - Fork 140
/
odoo.yml
64 lines (60 loc) · 1.95 KB
/
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
# DOMAIN=example.com docker stack deploy -c odoo.yml odoo
# odoo --stop-after-init --no-xmlrpc --no-http -c /etc/odoo/odoo.conf --db_host db --database odoo --db_user odoo --db_password myp@ssw0rd -u all # Upgrade
# proxy_mode = True
services:
web:
image: odoo:${VERSION:-17.0}
entrypoint: /bin/sh
user: root
command:
- -c
- |
if [ ! -f /etc/odoo/odoo.conf ]; then
curl -o /etc/odoo/odoo.conf https://raw.githubusercontent.com/odoo/docker/master/$${VERSION:-17.0}/odoo.conf
fi
chown -R 101:101 /etc/odoo /var/lib/odoo
/entrypoint.sh odoo
volumes:
- ${VOLUME_PATH}odoo:/var/lib/odoo
- ${VOLUME_PATH}config:/etc/odoo
- ${VOLUME_PATH}addons:/mnt/extra-addons
environment:
- USER=odoo
- PASSWORD=myp@ssw0rd
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.odoo-${NUMBER:-1}.rule=Host(`${DOMAIN:-odoo.localhost}`)
- traefik.http.routers.odoo-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.odoo-${NUMBER:-1}.service=odoo-${NUMBER:-1}
- traefik.http.routers.odoo-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.routers.odoo-${NUMBER:-1}.middlewares=odoo-${NUMBER:-1}
- traefik.http.services.odoo-${NUMBER:-1}.loadbalancer.server.port=8069
- traefik.http.middlewares.odoo-${NUMBER:-1}.headers.customRequestHeaders.X-Forwarded-Proto=${SCHEME:-https}
networks:
- internal
- traefik
db:
image: postgres:${POSTGRES_VERSION:-12-alpine}
environment:
- POSTGRES_USER=odoo
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=myp@ssw0rd
healthcheck:
test: ["CMD", "pg_isready", "-U", "odoo"]
volumes:
- ${VOLUME_PATH}db:/var/lib/postgresql/data
networks:
- internal
volumes:
db:
odoo:
config:
addons:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net