Skip to content

hnjm/odoo-v17-enterprise

Repository files navigation

Odoo 17 Enterprise Dockerized Deployment

This guide provides a complete Dockerized solution for deploying Odoo 17 Enterprise on your local machine or a remote server, including automated CI/CD workflows using GitHub Actions.

Prerequisites

These are the softwares you need to install before getting started:

  • Git
  • Docker
  • Docker-Compose

Project Setup

  1. Clone This Repository:

    https://github.com/prixite/odoo-v17-enterprise.git
    
  2. Setup Environment Variables By Copying env.example file:

    cp env.example .env
    
  3. Edit .env With Your Preferred Values:

    POSTGRES_USER=odoo
    POSTGRES_PASSWORD=odoo
    POSTGRES_DB=postgres
    ODOO_USER=odoo
    PASSWORD=odoo
    DATABASE=postgres
    HOST_PORT=8071
    CONTAINER_PORT=8069
     
  4. Modify etc/odoo.conf If Necessary:

    [options]
    addons_path = /mnt/extra-addons,/mnt/enterprise-addons
    data_dir = /var/lib/odoo
    admin_passwd = masterpassword
    limit_time_real = 12000
    proxy_mode = True
     
  5. Start Odoo Services With The Command:

    docker-compose up -d 
    
  6. Check Running Containers:

    docker ps
    
  7. Access Odoo 17 Enterprise:

image

Notes

  • Custom modules should be placed inside the addons/ directory.
  • Odoo 17 Enterprise addons should remain in the enterprise/ directory.
  • All commands for installing Git, Docker, and Docker Compose on Ubuntu 22.04 are available in the /commands directory.

(back to top)

CI/CD workflows using GitHub Actions

This part explains how you can automate your deployments using GitHub Actions on a remote server.

Prerequisites

Before setting up the project, ensure you have:

  • A remote server (preferably Ubuntu 22.04) on any cloud provider (AWS, Azure, GCP, Linode, etc.).
  • SSH access to your remote server.
  • This project should be set up on your remote server following the process explained above.
  • Ensure the required port (e.g., 8071) is open on your server's firewall.
  • You should be able to access your Odoo instance at http://your-server-public-ip:port

Set Up Github Secrets

In your Github repository:

  • Go to Settings → Secrets and variables → Actions.

Add the following secrets:

  • SSH_PRIVATE_KEY: Your private SSH key for server access.
  • HOST_NAME: The IP address or domain of your server.

Configure Github Workflow

In your github/workflows/cicd.yml file, go to the last Job Deploy To Server

   - name: Deploy to Server
        run: |
          ssh -o StrictHostKeyChecking=no user@${{ secrets.HOST_NAME }} << EOF
            cd /path/to/your-repo
            git pull origin main
            sudo ./scripts/deploy.sh
          EOF

Replace:

  • user with your server's username (e.g., root, ubuntu)
  • /path/to/your-repo with the actual path to your project on the server (e.g., /odoo-v17-enterprise).

Trigger the Pipeline

Enable github actions & Push changes to the main branch or create a pull request.

The Github Actions pipeline will:

  • Build and test the Docker Compose setup.
  • Deploy the changes to the remote server if the build succeeds.

Conclusion

You now have a fully automated Odoo 17 Enterprise deployment setup with Docker and GitHub Actions. Modify configurations as needed for your environment, and enjoy seamless deployments! For any questions or improvements, feel free to open an issue in the repository!

(back to top)


© 2025 Prixite, All Rights Reserved.

https://github.com/Prixite