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.

59 lines
1.7 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  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. If you are not using a pre-created db run
  28. ```bash
  29. docker-compose run odoo python3 odoo-bin -d beescoop -i base -c odoo.conf
  30. ```
  31. All the modules need to be updated in order to be recognised.
  32. To do that run
  33. ```bash
  34. docker-compose run -p 8096:8096 odoo python odoo.py -c odoo.conf -d beescoop -u all
  35. ```
  36. Once the update has been done, you can simply run the whole project by running
  37. ```bash
  38. docker-compose up
  39. ```
  40. I like to start the database in the background to only have the logs of the application.
  41. ```bash
  42. docker-compose up -d db
  43. docker-compose up odoo
  44. ```
  45. ## 5) Login
  46. To login you may either use your account or the admin account whose password should have been reset to admin.