Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

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

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
dockerodoo.sh
2 Besvarelser
15332 Visninger
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
Kassér
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
Bedste svar

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
Kassér
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
Bedste svar

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
Kassér
Enjoying the discussion? Don't just read, join in!

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Built an odoo.sh alternative, would love your feedback
odoo.sh
Avatar
0
nov. 25
3
Demande d'explication - odoo.sh | odoo online Løst
odoo.sh
Avatar
Avatar
1
nov. 25
427
Odoo.sh initiating shutdown every 5-10 mins
odoo.sh
Avatar
Avatar
1
jul. 25
2950
Odoo 11: How to edit odoo.conf file in odoo.sh for queue jobs?
odoo.sh
Avatar
Avatar
Avatar
Avatar
Avatar
4
apr. 25
13624
odoo.sh determine production or dev instance from code ? Løst
odoo.sh
Avatar
1
feb. 25
4601
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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