You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

  1. # Create development environment using docker
  2. > Tested on fedora 31
  3. ## 1) install Docker
  4. Checkout the [installation guide](https://docs.docker.com/install/) from docker.
  5. TODO: make it work with [podman](https://podman.io/).
  6. Be sure to start the docker daemon using `systemctl start docker` (enable if you want it to persist on reboot).
  7. Depending on the distribution, you might need to either use sudo or create a docker group.
  8. The following instructions assume that you can use docker without being root, add sudo if necessary.
  9. ## 2) Build the images (odoo - postgresql)
  10. ~ 15 minutes
  11. ```bash
  12. docker-compose build
  13. ```
  14. ## 3) Load data in postgresql
  15. Copy the sql.gz dump into the `initial-data-load` folder.
  16. Prefix it with 02, so that it is loaded after user creation and before the crons are stopped.
  17. ```bash
  18. docker-compose up db
  19. ```
  20. This could take a while (~20 minutes) depending on the data dump you are using.
  21. In order to reset your database, remove the container.
  22. (It will have to rebuild the database the next time you start it).
  23. ```bash
  24. docker-compose rm db
  25. ```
  26. ## 4) Run the project
  27. All the modules need to be updated in order to be recognised.
  28. To do that run
  29. ```bash
  30. docker-compose run -p 8096:8096 odoo python odoo.py -c odoo.conf -d beescoop -u all
  31. ```
  32. Once the update has been done, you can simply run the whole project by running
  33. ```bash
  34. docker-compose up
  35. ```
  36. I like to start the database in the background to only have the logs of the application.
  37. ```bash
  38. docker-compose up -d db
  39. docker-compose up odoo
  40. ```
  41. ## 5) Login
  42. To login you may either use your account or the admin account whose password should have been reset to admin.