m1k1o / neko-rooms

Selfhosted collaborative browser - room management for n.eko
Apache License 2.0
456 stars 62 forks source link

Pass custom environment variables to rooms #130

Open Dalethium opened 3 months ago

Dalethium commented 3 months ago

Looking into the source code for this program, I don't see a place to specify environment variables such as the ones below.

NEKO_ICELITE: 'false'
NEKO_ICESERVERS: '[{ "urls": [ "turn:10.0.0.1:3478" ], "username":"neko", "credential":"neko" }, { "urls": [ "stun:stun.nextcloud.com:3478" ] }]'

Is there any way we could get the ability to pass custom environment variables to each of the containers spawned by this?

m1k1o commented 3 months ago

Hello. When creating room you can specify environment variables. Some of them are added automatically by the system, do you need to rewrite them?

Dalethium commented 3 months ago

I was hoping to have some added by default, more specifically.

m1k1o commented 3 months ago

Do you mean by default to all rooms when specifying in docker compose? Currently only available per room. But there is openapi spec and you can just create your own gui wrapper that sets those env variables for every room that you need.

Dalethium commented 3 months ago

Yeah, that's exactly what I mean. Do you plan on implementing something like that, or is it just outside the scope of what you want to do?

m1k1o commented 3 months ago

We cannot just pass all env variabled because then would be also configuration of neko rooms passed to each room. And we also cannot pass all NEKO_ env varibles because then again NEKO_ROOMS_ would be passed.

Maybe all NEKO_ that do not start with NEKO_ROOMS_ if that would not be very confusing.

Dalethium commented 3 months ago

That seems like a great solution, to be honest!

Or just something that is more specifically like NEKO_GLOBAL_ if that's easier.