https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
b

best-camera-79313

03/15/2024, 11:30 AM
I'm trying to get a PoC up and running for my collegues using docker compose. Is there a way to get the client key to be set in the .env of our nextjs app dynamically to have an easier setup?
f

fresh-football-47124

03/15/2024, 2:18 PM
the client keys are for the SDKs, no?
b

best-camera-79313

03/15/2024, 2:55 PM
Yep!
f

fresh-football-47124

03/15/2024, 9:10 PM
you can pass it in any way you like - the client key is not really a secret
but you may need it to change it per environment
b

best-camera-79313

03/15/2024, 9:28 PM
I was looking for a way to run
docker-compose up
and have the key set already. But realize that might be weird
f

fresh-football-47124

03/15/2024, 9:29 PM
oh, in the GrowthBook docker?
ya, that would be a bit unusual
if its not within GrowthBook, you could do that via the docker-compose.yml file
b

best-camera-79313

03/15/2024, 9:34 PM
Basically it would mean a preset key on docker-compose up.
f

fresh-football-47124

03/15/2024, 10:25 PM
oh, I see
that key value is stored in mongodb - you could make a quick script to set the client key to the one you want when doing docker-compose up
b

best-camera-79313

03/16/2024, 9:44 AM
Ah, good idea, thanks!
5 Views