Giter Site home page Giter Site logo

traefik-odoo's Introduction

odoo-traefik

Odoo + Traefik (replacing the Nginx reverse proxy)

Important note

The docker image wbsouza/odoo:11.0 contains everything to run Odoo (including the PostgreSQL). It's not recommended to run this image in production, it was build only for test purpose, to demonstrate a potential inconsistence using Traefik as a proxy for Odoo. Feel free to customize or make your own Odoo image, the source code of the image is available on https://github.com/wbsouza/odoo-docker.

*** The database is going to be re-created if you remove the file volumes/odoo/conf/.initialized. ***

Initial setup

  1. Access your domain provider and add the following entries to your domain (A or CNAME)
  • traefik.mycompany.io
  • odoo.mycompany.io
  1. Create a bridge network to be used by the containers
  • docker create network web
  1. Copy the file .env.sample to .env and change the domain name and the email for the LetsEncript certificate

  2. Execute docker-compose up

  3. Login with the default credentials (admin/admin)

  4. Install the CRM module (or any other backend module)

  5. Stop the odoo container docker stop odoo

  6. Change the configuration file volumes/odoo/conf/odoo.conf append the following parameters in the end of the file:

proxy_mode = True
workers = 4
  1. Login again with the default credentials

  2. Check the log files as well the browser looking for JavaScript errors, it should be working without any problem

Throubleshooting (knowed issue)

  1. If you want create volumes like in the odoo.conf.sample file, make sure to give the right permissions or change the owner in the host filesystem volumes, because the container will run with an unprivileged user (odoo, UID=9100, GID=9100).

chown -fR '9100:9100' volumes/odoo

traefik-odoo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

traefik-odoo's Issues

Odoo16 update + Gevent / Websocket support

Hi wbsouza,

I am attempting to configure Odoo16 with traefik. However, I am encountering some roadblocks. What are the headers configuration needed to get traefik to work with Odoo16?

Regards

Error: middleware "redirect@file" does not exist

Hi!

  • traefik and odoo are in different containers
  • to get rid of the error and redirect http to https I did the following:
      # had to replace redirect@file
#      - traefik.http.routers.odoo-http.middlewares=redirect@file
      - traefik.http.middlewares.odoo-http-https-redirect.redirectscheme.scheme=https
      - traefik.http.routers.odoo-http.middlewares=odoo-http-https-redirect
      #  end replacement

not sure that this is the only solution, but a possible workaround

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.