OdooConnectorAPI is a RESTful API designed to facilitate communication between external applications and the Odoo ERP system. It leverages FastAPI for efficient asynchronous communication and is containerized using Docker for easy deployment. This project also includes a Helm chart for Kubernetes deployments, allowing for scalable and manageable production environments.
- Python 3.8+
- Docker and Docker Compose
- Kubernetes cluster (for Helm deployment)
- Helm 3
- Clone the repository:
git clone https://github.com/datacosmos-br/OdooConnectorAPI.git
cd OdooConnectorAPI
- Install dependencies:
Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required Python packages:
pip install -r requirements.txt
- Set up environment variables:
Copy the .env.example
to .env
and adjust the variables to match your Odoo setup:
cp .env.example .env
Edit .env
to include your Odoo credentials and connection details.
- Run the application:
uvicorn app.main:app --reload
- Build and run the container:
docker-compose up --build
This command builds the Docker image and starts the containerized application, reading the .env
file for environment variables.
- Package the Helm chart:
Navigate to the Helm chart directory:
cd charts/odooconnectorapi
Package the Helm chart:
helm package .
- Deploy the chart to your Kubernetes cluster:
Assuming you have a Kubernetes cluster set up and your kubectl
is configured to communicate with it:
helm install odooconnectorapi odooconnectorapi-0.1.0.tgz --values values.yaml
Make sure to adjust values.yaml
according to your environment and requirements.
The application can be configured using environment variables. See .env.example
for a list of available variables.
We welcome contributions! Please open an issue or submit a pull request for any improvements or features.
This project is licensed under the MIT License - see the LICENSE file for details.