Skip to content

Latest commit

 

History

History
225 lines (152 loc) · 9.13 KB

File metadata and controls

225 lines (152 loc) · 9.13 KB
title Deploy
description Choose from Magic, Single region, or Advanced deployment options.

Magic Containers offers three deployment options: Magic deployment for effortless global provisioning, Single region for fast deployment without auto-scaling, and Advanced for full control over regions and scaling based on user activity. Before deploying, you'll need a private container registry configured.

Magic deployment

![](/images/docs/a7425adfd3e165ff54bce0d5b569cd08fb2cafe6ebea61fa9a38fa8d69ec1bcf-Screenshot_2025-05-27_at_11.23.38.png)

Magic deployment is the simplest way to get your app up and running. It leverages the power of Magic Containers AI to handle global provisioning efficiently and cost-effectively.

Magic Containers AI will automatically analyze your app's requirements, determine the optimal deployment regions, and provision your app globally in just a few clicks. This approach ensures the best possible performance while minimizing costs.

Single region deployment

Single region deployment gives you full control over provisioning settings, allowing you to deploy to the closest single region without the worry of any scaling. This is ideal for scenarios where you are wanting fast deployment and no auto-scaling.

Login to [bunny.net dashboard](https://dash.bunny.net/auth/login?pk_buttonlocation=menu). Select **Magic Containers** and click the **Add App** button.
<Frame>
  ![](/images/docs/c19bb3012eb95af51d13b459983d89e94a1ffd2064bafcea65b44a3925ec2e9e-image.png)
</Frame>
Select the **Single region deployment** option, define the name of your app, and click **Next Step**.
<Frame>
  ![](/images/docs/f05ba05a8cc798498c7dbe489345e62c5c98ce26c0bcd0b548a9afcbe66a01bc-Screenshot_2025-05-27_at_12.50.46.png)
</Frame>
After selecting Single region deployment, configure your **App region**. You will be presented with your closest region preselected and a list of all available regions.
<Frame>
  ![](/images/docs/7c91eefa4bdc3531dba7cb24599ba7ae9c70d97989fa122d5a86eebdb2c66a3f-Screenshot_2025-06-30_at_15.21.40.png)
</Frame>

After configuring the **App region** settings, click **Next Step.**

<Frame>
  ![](/images/docs/6b64dc8cd01863d95de9c06351ec9421fe52f9283dbe14dc06813164d046a82f-Screenshot_2025-06-30_at_15.22.16.png)
</Frame>
Click **Add Container**.
<Frame>
  ![](/images/docs/24b51224d1bbe27f2a261b7adc07434f699871f294faa6bb6e743521060b51b9-Single_region_-_container.png)
</Frame>

If you want your app to be available on the internet, you need to set up edge endpoints. Go to the **Endpoints** tab and click **Add New Endpoint**.

<Frame>
  ![](/images/docs/7d42129d7cc77e29db24f66ace83f264fd629282dac2140c0e701b059894a5e6-image.png)
</Frame>

- You need to name the endpoint (it must have a unique name).
- Decide how you want to expose the app, either using CDN or Anycast.
- Define the container port, which is the port on which the application is listening inside the container.
- Specify whether your application inside the container uses SSL for origin (only CDN setting).

Click **Add endpoint**, and then click **Add Container**.
Review your settings. If everything looks good, click **Next Step**.
<Frame>
  ![](/images/docs/aab12e2eb0c3404e4b24f164b6f73cd2586760988b27ca14726125af5671bb2c-image.png)
</Frame>

Click **Confirm and Create**.

<Frame>
  ![](/images/docs/5729c360c08606e07c12293f8feb22e98394689c830a8068f2fd26675693bcad-image.png)
</Frame>

You will be navigated to the overview screen of your app. The processing button should turn green, indicating that your app is being deployed.

<Frame>
  ![](/images/docs/94ef88fec4933b4e13cda07cad4689dbfcb852ece64eb52babb602214f530231-image.png)
</Frame>

Your application is now deployed and can be accessed by clicking here:

<Frame>
  ![](/images/docs/8ef79c614b1402619f36e3556b3eda7d76674394d20716e73fe2290f79fbde51-image.png)
</Frame>

The provisioner will take your region settings into account and deploy your app accordingly.

Advanced deployment

![](/images/docs/0b2c9b8e4451f8756fb4c187d3acbc6eb98bc4426b4a549263a156c2d2c8d83d-Advanced_Deployment.png)

Advanced deployment gives you full control over provisioning settings, allowing you to customize the deployment regions and react to user activity. This level of customization is ideal for scenarios where you have specific geographical requirements or want to optimize your deployment strategy based on user behavior.

Login to [bunny.net dashboard](https://dash.bunny.net/auth/login?pk_buttonlocation=menu). Select **Magic Containers** and click the **Add App** button.
<Frame>
  ![](/images/docs/c19bb3012eb95af51d13b459983d89e94a1ffd2064bafcea65b44a3925ec2e9e-image.png)
</Frame>
Select the **Advanced deployment** option, define the name of your app, and click **Next Step**.
<Frame>
  ![](/images/docs/98705a609aca2581e6d48dc9bd560193d2a128da47679f48a154a9355769a8fd-Screenshot_2025-05-27_at_11.27.18.png)
</Frame>
You will be presented with a list of all available regions. For each region, you can set whether it is a base region or a standard region:
- **Base region**: Regions where your app will always be deployed. You must select at least one base region and there is no maximum limit.
- **Enabled region**: The provisioning system will actively monitor user locations and behavior. If it identifies active users in a specific region, it will dynamically deploy the app to accommodate the user traffic. Conversely, if there is no user activity in a region, the app will not be deployed in that area.

<Frame>
  ![](/images/docs/f3476bf7b00a1dc409c5125c37ed65b90d1f255b6099a9a119944ea9833580aa-Screenshot_2025-06-30_at_15.58.52.png)
</Frame>

Based on your settings, the provisioner will react to user activity as follows:

- If the **Enabled Regions** and **Base Regions** are equal, the provisioner will use Static Provisioning. In this mode, the regions deployed over time will remain the same.
- If the sets are different, the provisioner will use **Auto Provisioning**. Regions are chosen based on end-user activity. If users are active in a region, the app will be deployed there. If there are no active users in a region, the app won't be deployed.

After configuring the region settings, click **Next Step.**
Set the minimum and maximum number of instances (maximum is 10), and click **Add New Container**.
<Frame>
  ![](/images/docs/d348d268a258d52cc4b66ff09458184bdebd3ee196e0edc1a590d952246ea39a-image.png)
</Frame>

Select the provisioning type.

<Frame>
  ![](/images/docs/064da8f98d9fe1db4a596eda7e97a4217831873772c3b2fa2ca9f0156720a29e-image.png)
</Frame>

If you want your app to be available on the internet, you need to set up edge endpoints. Go to the **Endpoints** tab and click **Add New Endpoint**.

<Frame>
  ![](/images/docs/7d42129d7cc77e29db24f66ace83f264fd629282dac2140c0e701b059894a5e6-image.png)
</Frame>

- You need to name the endpoint (it must have a unique name).
- Decide how you want to expose the app, either using CDN or Anycast.
- Define the container port, which is the port on which the application is listening inside the container.
- Specify whether your application inside the container uses SSL for origin (only CDN setting).

Click **Add endpoint**, and then click **Add Container**.
Review your settings. If everything looks good, click **Next Step**.
<Frame>
  ![](/images/docs/aab12e2eb0c3404e4b24f164b6f73cd2586760988b27ca14726125af5671bb2c-image.png)
</Frame>

Click **Confirm and Create**.

<Frame>
  ![](/images/docs/5729c360c08606e07c12293f8feb22e98394689c830a8068f2fd26675693bcad-image.png)
</Frame>

You will be navigated to the overview screen of your app. The processing button should turn green, indicating that your app is being deployed.

<Frame>
  ![](/images/docs/94ef88fec4933b4e13cda07cad4689dbfcb852ece64eb52babb602214f530231-image.png)
</Frame>

Your application is now deployed and can be accessed by clicking here:

<Frame>
  ![](/images/docs/8ef79c614b1402619f36e3556b3eda7d76674394d20716e73fe2290f79fbde51-image.png)
</Frame>

The provisioner will take your region settings into account and deploy your app accordingly.