Policy

Policy is a core concept of Qovery Business. It allows your team to customize the behaviours of the platform and adjust it perfectly to your organization's needs.

For instance, you can create a rule to deploy the master environment into the AWS Cloud provider and by all apps contained into this environment with your Circle CI account.

Default policies are set-up when you create an organization for the first time. Then you can start to use Qovery Business in seconds.

Options

Here is an exhaustive list of available policies options:

optiondescriptionmandatory
branchbranch name predicate; can be a list of branches and * is allowedyes
build platformbuild platform to use to build and test the apps from the the environmentyes
container registryonce build, the container image must be pushed into a container registryyes
environment modewhat is the mode of the environment ("development" or "production"). This choice affect the kind of resources provisionedyes
clusteron which cloud provider and cluster to run the environmentyes
monitoringwhat is the monitoring platform to useno
TTL (Time To Live)set how long the environment can live at maximumno
startup cronset when an environment must be startedno
shutdown cronset when an environment must be shutdownno
manual deploymentenvironment has to be manually startedno

Those options bring you the ability to compose your deployment flow depending on your business, economic and legal criteria.

Branch

What is the branch name that must match to apply this policy.

Examples:

  • master: if the branch name is master then match the policy.
  • main: if the branch name is main then match the policy.
  • dev/*: if the branch name starts with dev/ then match the policy (eg. dev/123 , dev/chat).
  • feat/*: if the branch name starts with feat/ then match the policy (eg. feat/123 , feat/billing).
  • *: any branch match the policy.

One or more branch name per policy can be specified.

Build platform

Which Build Platform do you choose to build and test your apps matching the policy.

Do you have a CI?

Container registry

In which Container Registry the final container image must be pushed? You can choose the one you want from this list. By selecting the one provided by your Cloud provider, you avoid paying for outgoing traffic.

Environment mode

Choose between Production and Development environment mode.

Production mode

A production environment is where the app is configured to be highly performant, and the database highly resilient.

E.g., If you run a NodeJS app and a PostgreSQL database in production mode:

  • 3 NodeJS app instances run at minimum and auto-scale according to the CPU and the RAM usage.
  • for PostgreSQL, a managed database is used to provide the best performance and maximize the availability.

However, running in production cost much more than running in development mode.

Development mode

A development environment is where the app, and the database are configured to be cost effective.

E.g., If you run a NodeJS app and a PostgreSQL database in development mode:

  • 1 NodeJS app instance run with the minimum CPU and RAM to avoid wasted resources.
  • for PostgreSQL, a containerized database with local storage to lower the cost at the price of a standard app.

However, running in production cost much more than running in development mode.

Cluster

In which Cluster your apps must run. If you have multiple clusters across different Cloud provider and regions, you can select the more appropriate. For instance, this is common to separate the production from the development applications.

Go into Cloud account to configure your clusters.

Monitoring

Qovery allows you to add an external monitoring solution such as Datadog or Newrelic on the environment that match the policy. This makes it possible to monitor only what is strictly necessary.

TTL (Time to Live)

The Time to Live (TTL) option delete or pause an environment after some time automatically. The minimum value is 1 minute. For instance, you can automatically delete an environment after 2 hours of run if no git event happens in the meantime. This option helps to reduce Cloud cost.

Startup cron

This option wake up an environment at the specific date and time and can be repetitive. For instance, you can automatically start an environment from Monday to Friday at 8am PST. This option helps to reduce Cloud cost.

Shutdown cron

This option shutdown an environment at the specific date and time and can be repetitive. For instance, you can automatically shutdown an environment from Monday to Friday at 7pm PST. This option helps to reduce Cloud cost.

Manual deployment

This option indicates if you prefer to manually start an environment or not.

Policy scenarios

Reduce development environment costs

TODO

Reduce the risk of production outage

TODO

Synchronize the staging environment with the production environment

TODO