oCoreoCore Docs

Projects & Environments

Organizing work with projects, environments, and branch mapping

Projects and environments provide the organizational structure for managing Odoo deployments. A project groups related instances, while environments define deployment stages (development, staging, production) within that project.

Overview

Loading diagram...

Projects

A project is a logical grouping of environments and their associated instances. Projects typically represent a single Odoo application or client engagement.

When to use projects

ScenarioRecommended approach
Single client with dev/staging/prodOne project with three environments
Multiple clientsOne project per client
Internal ERP + Customer portalTwo separate projects
Testing a new Odoo versionNew environment within existing project

Project settings

Each project has:

  • Name -- A human-readable name (e.g., "Acme Corp ERP")
  • Description -- Optional notes about the project's purpose
  • Git repository -- The repository containing custom Odoo modules (optional)
  • Default Odoo version -- The default Odoo version for new environments

Environments

An environment defines a deployment stage within a project. Each environment has its own instances, deployment configuration, and optionally its own Git branch.

Standard environment types

While oCore lets you name environments anything you like, following the standard development-staging-production pattern is strongly recommended. It maps naturally to Git branching strategies and deployment pipelines.

EnvironmentPurposeTypical branchInstance count
DevelopmentActive development and testingdevelop1
StagingPre-production QA and client reviewstaging1
ProductionLive customer-facing instancesmain1+

Branch mapping

Each environment can be mapped to a Git branch. When code is pushed to a mapped branch, oCore automatically triggers a deployment to the corresponding environment.

Loading diagram...

This creates a natural deployment pipeline:

  1. Developers push to develop -- changes deploy to Development automatically
  2. When ready, merge develop into staging -- deploys to Staging for QA
  3. After QA approval, merge staging into main -- deploys to Production

Environment configuration

Each environment can override project-level defaults:

SettingDescriptionInherited from
ServerWhich server hosts this environment's instancesMust be set per environment
Odoo versionOverride the project defaultProject
Git branchWhich branch triggers deploymentsMust be set per environment
Auto-deployWhether Git pushes trigger automatic deploymentsProject setting

The deployment pipeline

Loading diagram...

When a deployment is triggered (either by a Git push or manually):

  1. Build -- Clone the repository, build the Docker image with custom modules
  2. Snapshot -- Take a pre-deploy database snapshot for rollback capability
  3. Deploy -- Stop the old container, start the new one
  4. Health check -- Verify the instance is responding correctly
  5. Complete or rollback -- If health check passes, the deployment is complete. If it fails, restore from the pre-deploy snapshot.

Learn more about the deployment process in Deployments.

Relationship to instances

Each environment can have one or more instances. In most cases, an environment has exactly one instance, but multiple instances are supported for:

  • Horizontal scaling -- Running multiple Odoo workers behind a load balancer
  • A/B testing -- Running two versions simultaneously
  • Blue-green deployments -- Deploying to a standby instance, then switching traffic

Instances inherit their configuration from the environment but can override specific settings (worker count, memory limits, custom modules).

Further reading

Was this page helpful?