Summary#
An environment of your organization is either a test environment or a production environment. You choose which when you make it, and it stays that way. A production environment holds real people and their data, so nothing test-only ever runs there. A test environment is for trying the app out with demos, exams or a harness's data, and it is the only kind that takes a seed or a reset of its data.
Signature#
osyrin org add-environment <slug> --test | --production [--name <name>] [--offering <name>] [--rank <n>]Description#
Choosing the kind. osyrin org add-environment needs --test or --production. On a terminal you are asked if you give
neither. When nothing can ask, for example in a script, the command is refused. Admin's New environment form and Studio's
Publish sheet ask the same question and never pick an answer for you. The kind cannot be changed later. To turn a test
environment into a production one, make a new production environment instead. Every environment made before kinds existed
is production. A test environment counts toward your plan's environments like any other.
Where the kind shows. Admin's environments page and app page show a Test or Production badge on each environment.
osyrin org environments has a Kind column (kind in --json), as does osy link --json. osy deploy says which kind it
deploys to, for example "Asking for a deploy of billing to staging — a TEST environment…".
What a test environment allows. Admin's environments page lists each test environment's seeds and resets: the seed, who asked for it, when, and how it went. A seed's rows stay until that same seed is loaded again or the environment is reset, and rows your app's users wrote are never touched. Seeding or resetting a production environment is refused, however the request is made.
Locally it is different. osy seed <seed> runs against the app on this machine and replaces its rows. Local data is
your scratch space.
Examples#
osyrin org add-environment staging --test --name Staging # a TEST environment: seeds and resets allowed
osyrin org add-environment live --production --name Live # a PRODUCTION environment: real people and their data
osy deploy --env staging --server https://osyrin.app # "… to staging — a TEST environment…"
osy seed demo # local: replaces the local app's rowsSee also#
Deploying your app to an environment: deploy the app to an environment.
Importing data: bring in real rows from a file rather than a seed.