A simple Docker setup for Odoo!
A simple Docker setup for Odoo!
This project has been developed on a Linux system. To learn more about the system, visit the Dotfiles repository.
/
├── docs/
│ └── *.md
├── nginx/
│ ├── conf.d/
│ │ └── default.config
│ └── Dockerfile
├── odoo/
│ └── odoo.conf
├── CONTRIBUTING
├── LICENSE
├── .dockerignore
├── .env
└── docker-compose.yaml
Open a terminal in the directory where you store your repositories and clone it with the following command:
# HTTPS
git clone https://github.com/MetaChannelCorp/Odoo.git
cd Odoo/
# SSH
git clone git@github.com:MetaChannelCorp/Odoo.git
cd Odoo/
Copy .env.example to .env and fill the credentials:
cp .env.example .env
nano .env
Do the same for odoo.conf.example, copy it and fill the credentials:
cp odoo/odoo.conf.example odoo/odoo.conf
nano odoo/odoo.conf
A custom local domain is required to access Odoo.
sudo nano /etc/hosts
Add the following lines to your /etc/hosts file:
127.0.0.1 od.metachannelcorp.com od.metachannelcorporation.com
127.0.0.1 od.metachannelcorp.ie od.metachannelcorporation.ie
You can find a Docker image of this project ready to be pulled on GitHub Packages or Docker Hub official website!
Pull the latest image with the following commands:
# GitHub Packages
docker pull ghcr.io/metachannelcorp/meta-od-nginx:latest
# Docker Hub
docker pull fjrodafo/meta-od-nginx:latest
Make sure you have created and configured the .env and odoo.conf files correctly before continuing.
Build the container:
docker compose build
[!NOTE]
If you want to build the image locally, uncomment the
buildsection indocker-compose.yamland rundocker compose build. Otherwise, skip directly to the next step.
Run the container:
docker compose up -d
[!NOTE]
Check XML-RCP:
curl -s http://od.metachannelcorp.com/xmlrpc/2/common -d "<?xml version='1.0'?><methodCall><methodName>version</methodName><params></params></methodCall>" -H "Content-Type: text/xml"
Stop the Container:
docker compose down
docker build \
-t ghcr.io/metachannelcorp/meta-od-nginx:1 \
-t ghcr.io/metachannelcorp/meta-od-nginx:1.0 \
-t ghcr.io/metachannelcorp/meta-od-nginx:1.0.0 \
-t ghcr.io/metachannelcorp/meta-od-nginx:latest \
-t fjrodafo/meta-od-nginx:1.0.0 \
-t fjrodafo/meta-od-nginx:latest \
./nginx
docker push ghcr.io/metachannelcorp/meta-od-nginx:1
docker push ghcr.io/metachannelcorp/meta-od-nginx:1.0
docker push ghcr.io/metachannelcorp/meta-od-nginx:1.0.0
docker push ghcr.io/metachannelcorp/meta-od-nginx:latest
docker push fjrodafo/meta-od-nginx:1.0.0
docker push fjrodafo/meta-od-nginx:latest