This project sets up Odoo 8.0 with PostgreSQL using Docker and Docker Compose. It provides a development environment for Odoo applications.
- Docker
- Docker Compose
docker-compose.yml: Defines the services (Odoo and PostgreSQL)Dockerfile: Instructions for building the Odoo imageodoo-server.conf: Configuration file for Odooaddons/: Directory for custom Odoo modulesbackups/: Directory for database backups
-
Clone this repository:
git clone <repository-url> cd <repository-name> -
Build and start the containers:
docker-compose up -d -
Access Odoo at
http://localhost:8069
The following environment variables are set in the docker-compose.yml file:
HOST: Database hostUSER: Database userPASSWORD: Database passwordPOSTGRES_DB: PostgreSQL database namePOSTGRES_PASSWORD: PostgreSQL passwordPOSTGRES_USER: PostgreSQL user
You can modify these variables in the docker-compose.yml file if needed.
The Odoo configuration is stored in odoo-server.conf. You can modify this file to change Odoo settings.
Place your custom Odoo modules in the addons/ directory. They will be automatically loaded by Odoo.
The PostgreSQL data is persisted in a Docker volume named odoo-db-data.
To create a backup of the database:
-
Access the PostgreSQL container:
docker-compose exec db bash -
Create a backup:
pg_dump -U odoo postgres > /backups/backup_$(date +%Y%m%d_%H%M%S).sql
The backup will be stored in the backups/ directory.