How to change ROOT_URL in docker-compose with everything up

Hello, im here to ask about a little thing that i didnt find how to solve it,
i have my rocket chat running after a docker-compose, for an accident i started it as localhost:3000 and now im getting some problems because of that, so i have to change it to my domain adress instead of “localhost”.

rocketchat:
image: registry.rocket.chat/rocketchat/rocket.chat:3.13.5
command: >
bash -c
“for i in seq 1 30; do
node main.js &&
s=$$? && break || s=$$?;
echo “Tried $$i times. Waiting 5 secs…”;
sleep 5;
done; (exit $$s)”
restart: unless-stopped
volumes:
- ./uploads:/app/uploads
environment:
- PORT=3000

  - ROOT_URL=http://localhost:3000 >>> MY DOMAIN
           /\  ------ This is what i want to change
  


  - MONGO_URL=mongodb://mongo:27017/rocketchat
  - MONGO_OPLOG_URL=mongodb://mongo:27017/local
  - MAIL_URL=smtp://smtp.email

I would be very grateful if someone could help me with this little problem

HI!

You can change the ROOT_URL environment variable, then issue the command, where you docker-compose.yml is:

docker-compose up -d

it will recreate the container, changing the root_url to what you want. While this happens, Rocket.Chat will be unavailable until it start up again.

Also, if you want to upgrade, change the version at the image attribute to the latest one.

Of course, do some backups before :slight_smile:

Happy Rocking!

3 Likes

Thank you very much!!!

(pelo seu nome aparentemente vc é br, me salvou demais hahahaha)

1 Like

Tamo junto, parça :wink:

1 Like

Please mark as ‘Solved’ if this fixes your issue.

Thanks.