Deploying and undeploying your app

Magic Containers offers two deployment options for your applications: Magic deployment and Custom deployment. With Magic Containers, you can deploy your apps globally with minimal effort. Custom deployment option gives you full control over provisioning settings, allowing you to select specific regions for deployment and manage the deployment of your app based on user activity.

What you'll need

Before you dive in, make sure you have the following prerequisites in place:

  • A bunny.net account ( Log in or sign up for a free trial).
  • You should have a private container registry set up for GitHub or Docker. Additionally, you need to integrate this registry with the Magic Containers platform.

Magic deployment

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.

📘

Note

For a detailed guide on deploying an app using the Magic deployment option, please refer to the quickstart documentation .

Custom deployment

Custom 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.

To deploy your app using Custom deployment, follow the steps below:

  1. Login to bunny.net dashboard .

  2. Select Magic Containers and click the Add App button.

  1. Select the Custom Deployment option, define the name of your app, and click Deploy with Custom Settings.

After selecting custom deployment, the first step is to configure Region Settings.
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: Base regions are those 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 accomodate the user traffic. Conversely, if there is no user activity in a region, the app will not be deployed in that area.

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.
  1. After configuring the region settings, click Next Step.
  2. Set the minimum and maximum number of instances (maximum is 10), and click Add New Container.

  1. Select the provisioning type.

  1. Click Add Container.

  1. Name your container (ensure each container has a unique name within the application).

  1. Select the container registry, image, and tag. Click Add Container.

If you want your app to be available on the internet, you need to set up edge endpoints:

  1. Go to the Endpoints tab and click Add New Endpoint.

  1. Fill in required information.

  • 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).
  1. Click Add endpoint, and then click Add Container.
  2. Review your settings. If everything looks good, click Next Step.

  1. Click Confirm and Create.

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

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

The provisioner will take your region settings into account and deploy your app accordingly.
With the custom settings, you have the flexibility to tailor your app's deployment strategy to your specific needs, ensuring that it aligns with your user base and geographical requirements.

Undeploying your app

To undeploy your app, follow the steps below:

  1. Select Magic Containers and select your app.
  2. Click on the hamburger menu icon (three horizontal dots) on the right side of the screen and click the Undeploy button.

  1. In the pop-up window, click the Undeploy button to confirm.

Need help or encountering issues?

If you encounter any difficulties or have questions while following this Quickstart Guide, our support team is here to assist you. Please don't hesitate to contact us via support request form for prompt assistance.

Our dedicated support team is ready to help you resolve any issues you might face during the deployment process, provide additional guidance, or answer your questions.