Aller au contenu

Organizations, projects, apps and environments

ProductEnv stores secrets in four levels: an organization holds projects, a project holds apps, and each app has environments such as development and production. Knowing the levels tells you where to put a key and who can see it.

Mis à jour le

Cette page n’est disponible qu’en anglais pour le moment.

The four levels

How ProductEnv organizes secrets
LevelWhat it isExample
OrganizationYour company or team: billing, plan, members, single sign-on and security rulesAcme
ProjectOne product or repository, with its own people and rolesStorefront
AppOne deployable part of the project, each with its own environmentsweb, api, admin
EnvironmentOne set of values for one place the app runsdevelopment, staging, production

A new project has one app (called Main unless you name it) with development, staging and production environments; development is the default. You can add environments and, on paid plans, more apps.

The Shared app

Every project also has a Shared app (its keys are part of the Team and Business plans). Its keys are included in every app's environment of the same name, so a value used by the web app and the API, such as a database URL, lives in one place. When an app defines the same key, the app's value is used.

Service tokens and integrations always target an app's environment, which already includes its Shared keys.

How environments are named

The default app's environments are named directly (production). Other apps' environments are written <app>.<environment>, as in api.production. The CLI's --env and --app options and .productenv.json use these names.

Naming rules

Naming rules and limits
WhatRule
Secret keyUp to 100 characters: a letter or _ first, then letters, digits and _ . : -
Secret valueUp to 10,000 characters
EnvironmentUp to 30 characters: lowercase letters, digits and _
AppUp to 40 characters (shared, app and project are reserved)
ProjectUp to 60 characters, unique in the organization

Keys keep their case and characters, so .NET keys like ConnectionStrings:Default are stored as written. Integrations convert them to environment variable names when they sync.