facebook youtube pinterest twitter reddit whatsapp instagram

TonicsCloud Update 6: Container Reusable Variables & Others

This update introduces incredible features to TonicsCloud, such as the ability to have a container specific variables, meaning the variables would only be available for the container and then it can be used across apps in the container, this helps with reusability.

I would get to the container specific variables in a second.

Aside from the container variable feature, you can also customize:

  • Provider Region
  • Provider Prices
  • Whether you want billing or not, this is useful for those that do not care about billing customers, e.g, you want to use it for personal purposes.

Let me break down the features...

Container Variables

Container variables are only specific to the container and they are in env format, here is an example image:

Container Variable Demo Image

After deploying or updating the container changes, you can use it in any app settings by encapsulating it in: [[...]], where ... is the variable name, here is an nginx example:

Using container variable in nginx app

Here is another example in ACME app:

Container variable in acme app

Upon saving the app, it would pull the variables from the container and then use the value in the app, straightforward right ? ๐Ÿ˜Š

Note: If you make a change to the container variable, for the change to reflect, you might need to push the "Save Changes" button in the respective Apps.

Customize Provider Regions and Prices

It doesn't make no sense to have a fixed region and prices, so, I have provided a way to edit both the regions and prices.

Goto: TonicsCloud App settings in the admin page, and you should see something similar to the below image:

Prices and regions settings - TonicsCloud

Edit it and ensure they are json compatible, otherwise, it wouldn't work.

The prices is in the following JSON structure:

{
  "g6-nanode-1": {
    "service_type": "Server",
    "description": "Shared 1GB RAM - 1CPU Core - 25GB SSD",
    "price": {
      "monthly": 12
    },
    "memory": 1024,
    "disk": 25600
},
  "new-entry-key": {
    "service_type": "Server",
    "description": "Your new description here",
    "price": {
      "monthly": 50
    },
    "memory": 8192,
    "disk": 163840
  }
...
}

Please, be careful with the prices, once they are saved, it can not be deleted, however, you can add new ones.

In the above specific JSON object:

  • Each key represents a unique identifier for a server configuration (e.g., "g6-nanode-1").
  • Each value is an object containing details about the server configuration, including its service type, description, price, memory, and disk specifications.

Note: The prices should be compatible with whatever your server provider is using, you do not have to use every of your provider prices, however, ensure the key maps with the one your provider is using.

The regions are in the following structure:

[
  {"label":"Dallas, TX","id":"us-central"},
  {"label":"Mumbai, IN","id":"ap-west"},
...
]

Unlike the prices, the regions can be deleted and updated at will.

  • "label": representing the name of the location (e.g., "Dallas, TX").
  • "id": representing the identifier or code for the location (e.g., "us-central").

Note: The region should be compatible with whatever your server provider is using.

Billing is Optional

tonics cloud billing on-off

For standalone user or developers that want to use TonicsCloud for hosting personal project, you might not need the billing aspect of it as that is catered for clients, you can easily turn it off.

By turning off the billing, it would...

  • Remove the billing menu
  • Can run services indefinitely without adding credit or getting nagging notification

Would see you in the next update, where I finally write about hosting projects in TonicsCloud...

Related Post(s)

  • TonicsCloud Update 8: Realtime Communication and Container Propagation

    I added some interesting and awesome updates to Tonics CMS and TonicsCloud., and that include... Realtime Communication Across Windows and Tabs Finally, there is now a realtime communication in Toni

  • TonicsCloud Update 7: Cloud Container Automations

    In the previous guides, I covered hosting static sites in TonicsCloud, one thing you might have notice about those guides are that it is a bit chaotic clicking and clicking and clicking, it takes a to

  • TonicsCloud Update 5: What is TonicsCloud

    TonicsCloud is a project designed to simplify server management by providing users with their own VPS through VPS APIs and leveraging the flexibility of System container such as Incus...

  • TonicsCloud Update 2: Deploying, Resizing and Signaling Instances

    Here is an update on the TonicsCloud project, I will be sharing some challenges I encountered, my workarounds, and ehm, just general progress with the TonicsCloud project, first, let's talk about the

  • Started TonicsCloud Project

    I have been thinking about how I could monetize Tonics, I ended up working on something I would like to avoid due to its complexity and security, which is cloud offering, well, those doing it do not h

  • TonicsCloud Update 4: DNS Manager Integration

    Here is another update on TonicsCloud progress, this is a short update with a quick demo. Some of the TonicsCloud components require that you point to the IP address (which can be extracted from the Cloud Instance in