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:| Resource type | Default amount |
|---|---|
| CPU | 0.5 |
| RAM | Depends on the container profile assigned to each container type (for example, PHP uses HIGH_CPU). |
| Disk size* | 512 MB |
Specify a resource initialization strategy
Upsun provides the following resource initialization strategies:| Strategy | Description |
|---|---|
default | Uses the parent environment’s resource allocation for new containers. If no parent environment exists, allocates default resources instead. |
manual | Skips automatic allocation. The first deployment fails until you configure resources manually through the Console or resources:set in the CLI.This strategy lets you set the exact resources you want with a single deployment. Other strategies may require fine-tuning after the first deployment, which generates a second deployment. During that window, your environment runs briefly with unnecessary resources, and both deployments cause downtime. |
minimum | Uses the Upsun minimum resources for new containers. |
parent | Uses the parent environment’s resource allocation for new containers. If no parent environment exists, or if the container does not exist on the parent environment, falls back to allocating default resources. |
child | Uses the child environment’s resource allocation for new containers. Used only when merging a child environment into its parent. |
backup | When restoring a backup, initializes new containers using the same resource allocation as when the backup was taken. |
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
* The disk size is set to
minimum resource initialization strategy.| Container | CPU | RAM | Disk* |
|---|---|---|---|
| .NET core | 0.1 | 64 MB | 0 MB |
| Chrome Headless | 0.1 | 64 MB | None |
| Elasticsearch | 0.1 | 448 MB | 256 MB |
| Elasticsearch Premium | 0.1 | 448 MB | 256 MB |
| Elixir | 0.1 | 64 MB | 0 MB |
| Go | 0.1 | 64 MB | 0 MB |
| InfluxDB | 0.1 | 448 MB | 256 MB |
| Java | 0.1 | 448 MB | 0 MB |
| Kafka | 0.1 | 448 MB | 512 MB |
| MariaDB | 0.1 | 448 MB | 256 MB |
| Memcached | 0.1 | 352 MB | None |
| MongoDB | 0.1 | 448 MB | 256 MB |
| MongoDB Premium | 0.1 | 448 MB | 256 MB |
| Network Storage | 0.1 | 448 MB | 256 MB |
| Node.js | 0.1 | 64 MB | 0 MB |
| OpenSearch | 0.1 | 448 MB | 256 MB |
| Oracle MySQL | 0.1 | 448 MB | 256 MB |
| PHP | 0.1 | 64 MB | 0 MB |
| PostgreSQL | 0.1 | 448 MB | 256 MB |
| Python | 0.1 | 64 MB | 0 MB |
| RabbitMQ | 0.1 | 448 MB | 256 MB |
| Redis ephemeral | 0.1 | 352 MB | None |
| Redis persistent | 0.1 | 352 MB | 256 MB |
| Ruby | 0.1 | 64 MB | 0 MB |
| Rust | 0.1 | 64 MB | 0 MB |
| Solr | 0.1 | 448 MB | 256 MB |
| Varnish | 0.1 | 448 MB | None |
| Vault KMS | 0.1 | 448 MB | 256 MB |
None when the container never uses disk, and to 0 MB when the container doesn’t require disk but can use it.| Action | Available strategies | Default |
|---|---|---|
| First deployment | parent, default, minimum, manual | parent |
| Environment branch | parent, default, minimum | default (staging) / minimum (development), unless a source integration uses its configured strategy |
| Environment merge | child, default, minimum, manual | child |
| Environment activation | parent, default, minimum | default (staging) / minimum (development) |
| Backup restoration | backup, parent, default, minimum | backup |
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 | Environment type | Default strategy | Resources allocated |
|---|---|---|
| Staging | default | default resource amounts |
| Development | minimum | minimum resources |
parent strategy applies by default, unless a different strategy is configured on the integration.
If resource allocation is higher than expected, check the source integration’s configured strategy.To change the strategy used by a source integration, see Update an existing source integration.
Regardless of strategy or integration, Upsun automatically 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.
- Using the CLI
- In the Console
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| Environment type | Default strategy | Resources allocated |
|---|---|---|
| Staging | default | default resource amounts |
| Development | minimum | minimum resources |
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)
When you sync the data, Upsun checks if the child environment’s disk size is at least equivalent to the parent’s.
If not, the parent environment’s disk size is automatically applied to the child environment. This ensures the sync can succeed.
If not, the parent environment’s disk size is automatically applied to the child environment. 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