question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to change Docker ENV variable (change ROOT_URL)

See original GitHub issue

Issue

Impacted version: 0.62

Server Setup Information:

  • Operating System: Ubuntu 14.04
  • Deployment Method: Docker
  • Node Version: v4.8.6
  • MongoDB Version: 3.2.18
  • ROOT_URL environment variable (Is there a subfolder?): plesk.example.org:4000

Problem description: We want to change the ROOT_URL ENV from plesk.example.org:4000 to board.example.org

So I’ve set a proxy rule for my board.example.org vhost:

ProxyPassMatch   "^/(sockjs\/.*\/websocket)$" "ws://127.0.0.1:4000/$1"
ProxyPass        "/" "http://127.0.0.1:4000/"
ProxyPassReverse "/" "http://127.0.0.1:4000/"

Now I want to change the ROOT_URL, what is the best approach?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
xet7commented, Oct 18, 2018

@Michael2222

docker-compose stop wekan-app

Then change ROOT_URL in docker-compose.yml

docker-compose start wekan-app
0reactions
compumattercommented, Aug 13, 2019
DOCKER SOLUTION TO MODIFY ROOT_URL

>$ sudo service docker start

This next method will not require a container ID to stop the Wekan container
>$ sudo docker stop $(docker ps -q --filter ancestor=quay.io/wekan/wekan:master)
>$ sudo vim pathto...wekan-mongodb/docker-compose.yml

(now you are inside docker-compose.yml)
# Modify the ROOT_URL variable ie; 
# Comment out the existing http://localhost
# - ROOT_URL=http://localhost  #   <=== using only at same laptop/desktop where Wekan is installed
# Add the modified version by you / your company
- ROOT_URL=https://projects.mydomain.com  #   <=== using only at same laptop/desktop where Wekan is installed
(save and exit they docker-compose.yml)

OK, now let's commit those changes to the container with:

>$ docker-compose up -d

This will commit the changes **AND** start the container at the same time 

Done - test results in browser
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change ROOT_URL in docker-compose with ...
You can change the ROOT_URL environment variable, then issue the command, where you docker-compose.yml is: docker-compose up -d.
Read more >
How to change root_url at runtime? - Configuration
We are deploying through docker and if it's possible to se… ... file (listed below) can be overridden using environment variables.
Read more >
Environment variables in Compose
You can set default values for any environment variables referenced in the Compose file, or used to configure Compose, in an environment file...
Read more >
Environment Variables | Meteor API Docs
List of environment variables that you can use with your Meteor application. ... Setting DDP_DEFAULT_CONNECTION_URL when running a meteor server ...
Read more >
Changing environment variables for Docker existing ...
I think you are not meant to overwrite environment variables for a running container, you should just stop the running one and start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found