Skip to content

Instantly share code, notes, and snippets.

@thomas15v
Created July 26, 2018 09:11
Show Gist options
  • Save thomas15v/326c0b23aa6c3eab53cc6c0a6c12156d to your computer and use it in GitHub Desktop.
Save thomas15v/326c0b23aa6c3eab53cc6c0a6c12156d to your computer and use it in GitHub Desktop.

Revisions

  1. thomas15v created this gist Jul 26, 2018.
    33 changes: 33 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    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
    5 changes: 5 additions & 0 deletions odoo.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    [options]
    addons_path = /mnt/extra-addons
    data_dir = /var/lib/odoo
    admin_passwd = a_random_password
    workers = 2
    26 changes: 26 additions & 0 deletions traefik.toml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    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 = "[email protected]"
    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