parent resource initialization strategy,
which copies resource allocations from the parent environment.
If no parent environment exists, Upsun falls back to preset resource amounts instead.
You can also specify a different strategy when branching, merging,
activating, or restoring a backup.
The strategy applied by default depends on how the environment is created:
- For standard branching and activation, the default strategy depends on the environment type.
- For environments created through a source integration, the strategy configured on the integration applies instead.
Default resources
Upsun allocates the following default resources to every container when deployed for the first time:
* Only applicable if the app or service requires a disk (for example, databases such as MariaDB or PostgreSQL).
To allocate different resources, specify a resource initialization strategy, or adjust resources after deployment.
Specify a resource initialization strategy
Upsun provides the following resource initialization strategies:Minimum resource amounts per container type
Minimum resource amounts per container type
The following table shows the resources Upsun allocates to your containers when you opt for the
minimum resource initialization strategy.* The disk size is set to
None when the container never uses disk, and to 0 MB when the container doesn’t require disk but can use it.First deployment
Resource initialization strategies
Available:parent, default, minimum, manual Default:
parent- Without a source integration
- With a source integration
If you’re not using a source integration,
you can use a Git push option to specify a resource initialization strategy.
To do so, run the following command:For example, to use the You can specify a different resource initialization strategy for each deployment.
Terminal
minimum strategy for your deployment, run the following command:Terminal
Alternatively, you can use the official Git syntax for push options:
Terminal
Environment branch
Resource initialization strategies
Available:parent, default, minimum Default:
default (staging) / minimum (development)When using a source integration, defaults are per environment type:defaultfor production and staging environmentsminimumfor development environments
parent is not available for production environments in source integrations.To override these defaults, use the CLI (development environments only) or the API (all environment types). See the With a source integration tab below.
Regardless of strategy or integration, Upsun applies the parent’s disk size to the child environment if the child’s disk size is smaller. This ensures the branch can be created.
- Without a source integration
- In the Console (without source integration)
- With a source integration
Run the following command:For example, to inherit resources from the parent environment, run the following command:
Terminal
Terminal
Environment merge
Resource initialization strategies
Available:child, default, minimum, manual Default:
childApps and services already running on the parent environment keep their existing resources.
- Using the CLI
- In the Console
Run the following command:For example, to use the
Terminal
manual resource initialization strategy, run the following command:Terminal
Environment activation
Resource initialization strategies
Available:parent, default, minimum Default:
default if the new environment is of type staging, minimum if the new environment is of type development
To specify a different strategy, run the following command:
Terminal
parent resource initialization strategy, run the following command:
Terminal
Setting resources on an inactive environment using the Console or the CLI automatically activates it.
Backup restoration
Resource initialization strategies
Available:backup, parent, default, minimum Default:
backup- Using the CLI
- In the Console
When you restore a backup using the CLI,
you can restore it to your current environment or a different environment.If you deleted containers after backing up but before restoring, they are recreated using the When you restore previously deleted containers,
you can specify a different resource initialization strategy for them.For example, to use the
Restore to your current environment
By default, when you restore a backup using the CLI, it is restored to your current environment. The resources of every container running on the environment revert to the state they were in when the backup was taken.To skip restoring resources, use the
--no-resources option.backup strategy and granted the same resources as when the backup was taken.To skip restoring deleted containers, use the
--no-code option.Restore to a different environment
Thebackup strategy applies by default.
All apps and services are initialized as new containers on the environment,
and granted the same resources as in the backup.
You can specify a different resource initialization strategy for all containers.Specify a resource initialization strategy
Run the following command:Terminal
minimum resource initialization strategy, run the following command:Terminal
Environment sync
Syncing an environment means propagating changes from a parent environment into a child environment (the opposite direction of an environment merge). You can sync:- Only the code
- Only the data (databases, files)
- Only the resources (CPU and RAM, instances, and disk space)
- Any combination of the three (code and data, code and resources, data and resources, or all three)
If the child’s disk is smaller than the parent’s, Upsun automatically applies the parent’s disk size before syncing.
This ensures the sync can succeed.
- Using the CLI
- In the Console
Run the following commands depending on your needs:
-
Sync only resources:
Terminal
-
Sync only code:
Terminal
-
Sync only data:
Terminal
-
Sync everything:
You can adjust the command depending on the exact combination of elements you want to sync.Terminal