jitsi / docker-jitsi-meet

Jitsi Meet on Docker
https://hub.docker.com/u/jitsi/
Apache License 2.0
3.09k stars 1.37k forks source link

Changing .env after running doesn't change variables #21

Closed wreiske closed 6 years ago

wreiske commented 6 years ago

Running on 136460578d7fb5ae601643114a9e289c6fd2d758

  1. Edit .env to include sip credentials
  2. Run docker-compose -f docker-compose.yml -f jigasi.yml up -d
  3. Change sip credentials in .env
  4. Run docker-compose -f docker-compose.yml -f jigasi.yml up -d

No matter what you try, the sip credentials won't go away! I've tried logging out and back in to reset environment, I've tried blowing away the docker containers, images, etc. I've tried --force-recreate... It seems like to matter what I try, it is using the old credentials from the first time I ran the docker command.

Any ideas?

saghul commented 6 years ago

If you want the new credentials to be taken into account you need to delete the jigasi config. That's in $CONFIG/jigasi ($CONFIG being whatever you specified there).

The configuration is only applied the first time the container is started without any config. The reason for doing this is to allow full customization: once the config has been created you can go ahead and edit it to your needs and the system won't mess it up.

wreiske commented 6 years ago

Where is $CONFIG/jigasi? Inside the container itself? Blowing away the container completely and rebuilding it from scratch does not change the credentials for me.

Stop all running containers docker stop $(docker ps -aq)

Remove all containers docker rm $(docker ps -aq)

Remove all images docker rmi $(docker images -q)

Recreate containers from scratch docker-compose -f docker-compose.yml -f jigasi.yml up -d --force-recreate

The credentials will be the same as the first time it ran.

saghul commented 6 years ago

I'll explain this again.

Blowing the container does nothing, because the config is on a volume which is mounted into it. If you don't remove the config it will not be regenerated with the new credentials.

CONFIG is defined in the env file, so check your .env file, it's right at the top. Go to that directory and remove the jigasi directory. Then start the container again.

wreiske commented 6 years ago

Ahh, I found it.

# Directory where all configuration will be stored.
CONFIG=~/.jitsi-meet-cfg

I was looking in my home directory for that folder, but it doesn't exist! It's actually in: /root/snap/docker/current/.jitsi-meet-cfg/

Thanks.