Skip to content

Instantly share code, notes, and snippets.

@thomas15v
Created July 26, 2018 09:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save thomas15v/326c0b23aa6c3eab53cc6c0a6c12156d to your computer and use it in GitHub Desktop.
Save thomas15v/326c0b23aa6c3eab53cc6c0a6c12156d to your computer and use it in GitHub Desktop.
Install odoo with docker-compose
version: '2'
services:
db:
image: postgres:9.4
restart: always
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=odoo
odoo:
image: odoo:11
restart: always
links:
- db:db
volumes:
- ./odoo.conf:/etc/odoo/odoo.conf
- ./extra-addons:/mnt/extra-addons
labels:
- "traefik.enable=true"
- "traefik.odoo.frontend.rule=Host:example.com"
- "traefik.odoo.port=8069"
- "traefik.chat.frontend.rule=Host:example.com;PathPrefix:/longpolling"
- "traefik.chat.port=8072"
proxy:
image: traefik
command: --web -c /etc/traefik/traefik.toml --LOGLEVEL=debug
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/etc/traefik/traefik.toml
- /acme
[options]
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo
admin_passwd = a_random_password
workers = 2
InsecureSkipVerify = true
defaultEntryPoints = ["https", "http"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
compress = true
[entryPoints.https.tls]
[acme]
email = "systems@example.com"
storage = "/acme/acme.json"
entryPoint = "https"
OnHostRule = true
[acme.httpChallenge]
entryPoint = "http"
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "docker.localhost"
exposedbydefault = false
watch = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment