The environment
An online version of your website including a full runtime.
# Intro
- An environment is a sub object of an app
- Each app needs to have at least one environment
- Environments are managed in the dashboard
- Each environment is a separated hosting setup, with individual settings
- Each environment has individually billed components
- Create multi staging workflows with multiple environments
We usually use 'environment', in some contexts maybe 'app environment' since this explicitly names the fortrabbit object and can not be confused with a development environment. In the dashboard, the environment title will constructed lie so: {app name} / {environment id}.
# Environment maps to git branch
While the Git repo is connected with the app, the environment can be mapped to a git branch. Git deployment is optional but blends in nicely.
# Environment workflows
Not all apps will have multiple environments. See the project organization article on how to work with apps and environments.
# Naming an environment
The default name for environments is main. This does not imply if the environment is used for development or production. Many apps only have one environment that will first be used during development and later for production.
When connecting a git branch to an environment, the branch name will be used. The environment name can also be changed in the dashboard.
# Creating an environment
While creating a new app you will also create an environment along the way. You can also create new environments for any of your apps later on.
# Restarting an environment
The restart button will restart all services. This can sometimes be helpful when processes are hanging.
In some edge cases, like hanging PHP processes with 504 errors or 408 errors, restarting an environment can be an option. Here is how you can do this:
- visit the environment in the dashboard
- find and click the "Restart" button
- wait a minute until changes are applied
This will restart the Apache service and the PHP-FPM processes. Nothing more, the data will stay safe. There will be a short downtime. Use carefully, it should not be used on a regular basis. This button is not a silver bullet to fix all server issues. If performance is a constant issue, see performance topic.
# Deleting an environment
You can delete any environment you own or administer. To delete an environment, go to the environment in the dashboard and click the "delete" button. The environment will be removed within a few minutes, including all files and databases.
# Recovering deleted environments
Environment deletion is permanent and cannot be reversed. We thoroughly remove data when requested by clients or when required due to legal or payment issues. This policy protects your privacy and security. We believe you have the right to be forgotten rather than having your data held hostage (for payment). In most cases, this complete deletion is actually beneficial. For more information, see how we handle bounced payments.
# Environment settings
The environment has a lot of settings exposed in the fortrabbit dashboard. See the hosting settings topic.
Found a tpyo?Edit