Plan
Plan copied to clipboard
CloudNet v4 Support
I would like to be able to..
It would be nice, if you can have an Config option, to enable CloudNet Support.
Is your feature request related to a problem? Please describe.
When it is enabled Plan would set the ServerName to the name of the CloudNet service. This is really useful, beacuse if the services/servers aren't static you cannot change the ServerName and beacuse of this, all servers would use the same Name
Can Cloudnet set environment variables?
Plan supports environment variables for configuration.
PLAN_PLUGIN_SERVER_NAME=name
PLAN_SERVER_UUID=uuid
CloudNet supports environmentVariables, but i don't know if they can be set dynamicly, i will look if i can do that
Sadly, cloudnet does not allow to set the environmentVariables automaticly to the server name
Does it support running scripts before server starts? Doing a export PLAN_SERVER_NAME=$CLOUDNET_SERVER_NAME (Or whatever their environment variable for the name is) could be used to do this in bash.
I dont think so, the way you set the environment variables is in a json file. i have it like this right now
"environmentVariables": { "PLAN_PLUGIN_SERVER_NAME": "test-1" }
It just seems really backwards to get configuration variables by having to ask the platform rather than the platform dictating the value - usually everything is configured top down to retain control over what is happening. I'd ask Cloudnet first if they would add support for setting specific environment variables as the server name, copying your example, something like
"environmentVariables": { "PLAN_PLUGIN_SERVER_NAME": "$serverName" }
It should be way easier for them to implement change like that than me having to add their api and figure out what to call and where
I have already asked, and they said that i would have to code that myself, i will try it, and thank you for the quick response but i still have a question, do i have to set the ServerName to nothing in the config if i use the environmentVariables? beacuse right now, it seems like it didnt take the environmentVariable and still uses the name from the config
I probably remembered the config path wrong. Basically uppercase it and put _ between any levels, might be PLAN_SERVER_NAME instead.
If the environment variable exists the one in the file won't be read at all.
Okay, thank you
Another ticket that would solve this issue https://github.com/CloudNetService/CloudNet/issues/1354