-
Download the Repository
git clone [email protected]:Sergio2409/docker_compose_odoo_template.git
-
Enter the folder
- cd docker_compose_odoo_template
-
Select Odoo version from the Supported tags.
- Go to to the link Odoo oficial docker image
- Select one tag from the the Supported tags and respective Dockerfile links for the respective Odoo version.
- Update the file
odoo.Dockerfilewith the respective Odoo version. - First line of file
odoo.DockerfileFROM odoo:14.0, 14.0 is the default tag
-
The next step is to update the
.envfile with your own values if required otherwise you can let the default values. File.env:- DB_IMAGE=postgres - Postgres oficial docker image
- DB_TAG=latest - From the above link select the respective tag, the
latesttag is the default - DB_PORT=5433 - PostgreSQL port
- DB_NAME=odoo - Database name
- DB_USER=odoo - User login
- DB_PASSWD=odoo - User password
-
Before using the file you need to execute the build command. This step is executed only one time
sudo docker-compose build
-
Start all the containers the first time
sudo docker-compose up
-
Comment the line 15 of the
docker-compose.ymlto avoid installing thebasemodule every time -
Start all the containers
sudo docker-compose up
-
Open the Odoo instance by clicking this link
- The credentials are configured in the
.envfile. - If no changes are made use login:
adminand password:admin
- The credentials are configured in the
-
At this point the setup was finished if no error occured
-
How to start all containers
sudo docker-compose up
-
How to stop all containers
Press Ctrl + c
-
How to Do a Clean Restart of a Docker Instance
- Stop the container(s) using the following command:
docker-compose down - Delete all containers using the following command:
sudo docker rm -f $(sudo docker ps -a -q) - Delete all volumes using the following command:
sudo docker volume rm $(sudo docker volume ls -q)
Note: Deleting volumes will wipe out their data. Back up any data that you need before deleting a container
- Stop the container(s) using the following command:
-
How to execute the Odoo scaffold command
sudo docker exec odoo-stack /usr/bin/odoo scaffold openacademy /mnt/extra-addons
-
How to execute the Odoo install command in console
- Uncomment the line 15 of the
docker-compose.ymland modify theopenacademyby the propper module name
- Uncomment the line 15 of the
-
How to execute the Odoo update command in console
- Uncomment the line 17 of the
docker-compose.ymland modify theopenacademyby the propper module name
- Uncomment the line 17 of the
-
How to include custom addons into the container
- Create the new addon into the
addons-extrafolder to be recognized by the Odoo container - Stop the server
- Start the server
- Remember to update the App list inside Odoo Apps
- Create the new addon into the