#Dial-In Pin API URL
PIN_MAPPER_URL=https://jitsi-api.jitsi.net/
I have defined the above in .env file, made the corresponding entry in docker-compose.yml file under web service. under ~/docker-jitsi-meet/web/rootfs/dist/assets folder , I want to use environment configuration like this , but unable to use like below.
(function(window) {
window.env = window.env || {};
// Environment variables
window[“env”][“API_URL”] = ‘{{ .Env.API_URL }}’;
window[“env”][“API_GATEWAY_URL”] = ‘{{ .Env.API_GATEWAY_URL }}’;
window[“env”][“SocketIOChatUrl”]=’{{ .Env.SOCKETIO_CHAT_URL }}’;
window[“env”][“GoogleApiKey”]=’{{ .Env.GOOGLE_API_KEY }}’;
window[“env”][“GoogleAuthId”]=’{{ .Env.GOOGLE_AUTH_ID }}’;
window[“env”][“firebaseConfig_apiKey”]=’{{ .Env.FIREBASE_CONFIG_APIKEY }}’;
window[“env”][“firebaseConfig_authDomain”]=’{{ .Env.FIREBASE_CONFIG_AUTH_DOMAIN }}’;
window[“env”][“firebaseConfig_databaseURL”]=’{{ .Env.FIREBASE_CONFIG_DATABASE_URL }}’;
window[“env”][“firebaseConfig_projectId”]=’{{ .Env.FIREBASE_CONFIG_PROJECTID }}’;
window[“env”][“firebaseConfig_storageBucket”]=’{{ .Env.FIREBASE_CONFIG_STORAGE_BUCKET }}’;
window[“env”][“firebaseConfig_messagingSenderId”]=’{{ .Env.FIREBASE_CONFIG_MESSAGING_SENDERID }}’;
window[“env”][“firebaseConfig_appId”]=’{{ .Env.FIREBASE_CONFIG_APPID }}’;
window[“env”][“firebaseConfig_measurementId”]=’{{ .Env.FIREBASE_CONFIG_MEASUREMENTID }}’;
window[“env”][“PIN_MAPPER_URL”]= ‘{{ .Env.PIN_MAPPER_URL }}’;
})(this);
I have mounted the dist folder at /usr/share/jitsi-meet/admin/ in web container.
like this
./web/rootfs/dist/:/usr/share/jitsi-meet/admin/:rw under web service I have another question, How the .Env is used to access environment configuration
exec into the container and use command echo $FIREBASE_CONFIG_MEASUREMENTID and check if its print something or not.
Are you putting all these env variables here?
exec into the container and use command echo $FIREBASE_CONFIG_MEASUREMENTID and check if its print something or not.
It prints nothing Are you putting all these env variables
yes. like below
- API_URL
- API_GATEWAY_URL
- SOCKETIO_CHAT_URL
- GOOGLE_API_KEY
- GOOGLE_AUTH_ID
- FIREBASE_CONFIG_APIKEY
- FIREBASE_CONFIG_AUTH_DOMAIN
- FIREBASE_CONFIG_DATABASE_URL
- FIREBASE_CONFIG_PROJECTID
- FIREBASE_CONFIG_STORAGE_BUCKET
- FIREBASE_CONFIG_MESSAGING_SENDERID
- FIREBASE_CONFIG_APPID
- PIN_MAPPER_URL
- FIREBASE_CONFIG_MEASUREMENTID
Thanks for reply.
I have added HELLO=hello-world env variable in .env file and then use this HELLO env variable in docker-compose.yaml file under web services. After that spin up the containers and then exec into web container and then use command printenv inside web container. OR simply run docker exec docker-jitsi-meet_web_1 printenv command