Environment variables per environment

So I opened this thread asking for help how to get the environment variables into my RoR app. (https://forum.enscale.com/discussion/9/set-environment-config-variables#latest). I also got an email asking if I could get any help, so I asked there and got a reply, which you can read in the above url.

That being said, I suggested via email and repeating here, I think we should be able to set the env variables in an environment level. So, available through all nodes.

An example that comes to mind is, an app that has a separate node for a Sidekiq instance. This scenario will make it so you need the redis URL for both the web server and the sidekiq node, having to set them up in each node is just painful, plus it would be better having a more straightforward way of doing it.

Thanks

Comments

  • DamienDamien Enscale Team

    An example that comes to mind is, an app that has a separate node for a Sidekiq instance. This scenario will make it so you need the redis URL for both the web server and the sidekiq node, having to set them up in each node is just painful, plus it would be better having a more straightforward way of doing it.

    I'm not a Ruby dev, but to me Sidekiq always seemed like a poor version of cron? Isn't it easier to just use standard cron since Enscale has that option, or are you using it for other functionality (I think you can also use it like a message / job queue)?

  • @Damien eh, I actually don't know what to reply. I don't think they compare at all.

    Sidekiq is a background processing service. It's not just to schedule jobs, it's to do them async. Besides, it's really just an example, not really on to the point of the thread.

  • DamienDamien Enscale Team

    @pmcnano no problem. It was mostly with a view to keeping things as simple and straightforward as possible. If sidekiq is commonly used for cron-like functionality (i.e. as a workaround for other services not having cron), that is easiest to solve by simply using cron on Enscale!

    I'm aware of https://github.com/moove-it/sidekiq-scheduler for using sidekiq in that manner.

    Your point about environment variables is a good one regardless, and of course also not unique to Ruby either.

    pmcnano
Sign In or Register to comment.