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