Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

How to mimic odoo.sh for local development based on Odoo Docker Images

Naroči se

Get notified when there's activity on this post

This question has been flagged
dockerodoo.sh
2 Odgovori
15326 Prikazi
Avatar
Tim Turnquist

I am new to Odoo and have struggled getting my local development environment set up properly to mimic the Odoo.sh (Enterprise) instance that we have.

4
Avatar
Opusti
Ermin Trevisan

Thank you very much for this valuable write-up, but please formulate it as question/answer, that way you can also earn the upvotes :-)

OdooBot
Two things:
  1. My intent was to help someone, not gain upvotes. By you closing it it serves neither of those objectives.
  2. I have tried to edit it, both before it was closed and after. Why would I not be able to edit my own post.
Based on those two items I will not be contributing to the "help" forum anymore. It has proven to be a complete waste of time -- more of a game than anything of real use.

Thanks,

Tim Turnquist

On Mon, May 14, 2018 at 3:56 PM, Ermin Trevisan <trevi@twanda.com> wrote:

Thank you very much for this valuable write-up, but please formulate it as question/answer, that way you can also earn the upvotes :-)

--
Ermin Trevisan


Sent by Odoo S.A. using Odoo.


Avatar
Ermin Trevisan
Best Answer

This is the answer by Tim Turnquist, I have made a Q&A from his original post.

I am new to Odoo and have struggled getting my local development environment set up properly to mimic the Odoo.sh (Enterprise) instance that we have. It uses the Odoo Docker Image that is on the Docker Hub, but adds an easy way to include the Enterprise addons. I have recently completed setting this up and thought I might share what I learned with the community. 

  1. FIrst, install Docker (https://docs.docker.com/install/)

  2. Then create a file structure that looks like this:

  3. addons
    config
        odoo.conf
    enterprise
    docker-compose.yml
  4. Inside of the 'addons' folder clone/checkout your local code modules

  5. Inside of the 'config' folder have one file, odoo.conf that contains:

  6. [options]
    addons_path = /home/odoo/user,/home/odoo/enterprise
  7. Inside of the 'enterprise' folder put all of the enterprise addons

  8. And, finally, the docker-compose.yml should look like this:

  9. version: '2'
    services:
    web:
    container_name: odoo
    image: odoo:11.0
    depends_on:
    - db
    ports:
    - "8069:8069"
    volumes:
    - odoo-web-data:/var/lib/odoo
    - ./config:/etc/odoo
    - ./enterprise/addons:/home/odoo/enterprise
    - ./addons:/home/odoo/user
    db:
    container_name: db
    image: postgres:9.4
    environment:
    - POSTGRES_PASSWORD=odoo
    - POSTGRES_USER=odoo
    - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
    - odoo-db-data:/var/lib/postgresql/data/pgdata
    volumes:
    odoo-web-data:
    odoo-db-data:
  10. Once you have everything in place, run the following command:

  11. docker-compose up -d
  12. That will create a Docker Container for your database and another one for your Odoo code

  13. With your customized code in the 'addons' folder, point your IDE there and start coding.

  14. Your code changes can be seen at http://localhost:8069. (You may need to recycle your Odoo container, upgrade your app or update the apps list to see the changes)

While this is not an exact replica of Odoo.sh, it is fairly close and enables me to get up and into development mode quickly and easily. I hope this helps someone.


Please let me know if you have any questions, comments or other feedback.

4
Avatar
Opusti
Bruce Rochester

I would like to add another tip that I have been using to quickly get up and running from backups using this technique.

In order to back up Odoo, you need a data dump from postgres, and a backup of the filestore.

I store my backups as follows:

./backups

--./backups/filestore (mapped to odoo filestore in web container)

--./backups/db (contains 1 .sql file for each database, mapped to /docker-entrypoint-initdb.d in db container)

On the Odoo container you would like to back up, just execute pg_dump, something like this:

docker exec <container> pg_dump -U odoo -E UTF-8 -F p -b -C <DB_NAME> -f /docker-entrypoint-initdb.d/<DB_NAME>.sql

Next time you start a container w/ fresh volumes, the sql dump will be loaded into the new db, and your container will already have access to the filestore that you mounted. Just make sure that when you spin up new containers, the filestore you are using hasn't been modified since the last backup was taken.

You can see the logs as the database gets initialized, right after you start the containers:

docker logs --tail 50 --follow --timestamps <db container>

Bruce Rochester

Forgot to mention how to add the mappings. In your docker-compose.yml, add:

Under db -> volumes:

- ./backups/db:/docker-entrypoint-initdb.d

Under web -> volumes:

./backups/filestore:/var/lib/odoo/filestore

Avatar
Mahmoud
Best Answer

I managed that using GitLab Auto DevOPS 
you can create a script to get any change on ur code and create test env and prod env 
and run the test procedures on ur code before build and deploy exactly like odoo.sh   

u can use docker only or kubernetes with teraform to accomplish this cycle 

0
Avatar
Opusti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Built an odoo.sh alternative, would love your feedback
odoo.sh
Avatar
0
nov. 25
2
Demande d'explication - odoo.sh | odoo online Solved
odoo.sh
Avatar
Avatar
1
nov. 25
427
Odoo.sh initiating shutdown every 5-10 mins
odoo.sh
Avatar
Avatar
1
jul. 25
2948
Odoo 11: How to edit odoo.conf file in odoo.sh for queue jobs?
odoo.sh
Avatar
Avatar
Avatar
Avatar
Avatar
4
apr. 25
13620
odoo.sh determine production or dev instance from code ? Solved
odoo.sh
Avatar
1
feb. 25
4601
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now