Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble setting url_path_prefix #133

Closed
wouterAA opened this issue Feb 5, 2015 · 13 comments
Closed

Trouble setting url_path_prefix #133

wouterAA opened this issue Feb 5, 2015 · 13 comments

Comments

@wouterAA
Copy link

wouterAA commented Feb 5, 2015

Hi there,

I would love to set the root_path variable to something like /libreboard so that I can access the project by https://example.com/libreboard but I can't find out how I can achieve this.

I tried to add it to the environments variables when starting a docker container (docker run -d ... -e "ROOT_URL=https://example.com" -e "ROOT_URL_PATH_PREFIX=/libreboard") but this doesn't seem to work, and (docker run -d ... -e "ROOT_URL=https://example.com/libreboard") seems to result in the application thinking that the ROOT_URL=https://example.com/libreboard and the ROOT_URL_PATH_PREFIX=/libreboard.

I'm not familiar with meteor, but would love to run libreboard. Am I missing the correct way to set a url path prefix, or is some code change required to allow setting it.

Wouter

@hokkey
Copy link

hokkey commented Aug 8, 2015

I have a same question. How can I run the app as subdirectory?

@StreakyCobra
Copy link

Hi,

Same here, I'm trying to run wekan (docker container) in a subdirectory. I tried to use ROOT_URL alone and in combination with ROOT_URL_PATH_PREFIX, but I was unable to make it work. Here is what I noticed (RU = ROOT_URL and PP = ROOT_URL_PATH_PREFIX):


RU=http://example.com/

Everything works correctly at /


RU=http://example.com/libreboard/

Kind of working at /libreboard, but not correctly. Page URLs in the address bar are wrong (missing the /libreboard part), but the pages are still displayed and working unless pages are refreshed or the URL reloaded.


Adding the PP argument for each RU doesn't change the explained behaviours.

@mquandalle
Copy link
Contributor

So first of all, Wekan doesn’t implement any specific logic to serve the application to a given URL, this is all handled by the Meteor framework and the routing package (flow-router). As you noticed @StreakyCobra the ROOT_URL_PATH_PREFIX environment variable doesn’t have any effect (not sure where it came from) but the path is supposed to be deduced from the ROOT_URL variable (see meteor/meteor#2067)

I think this is a problem with Flow-router, will investigate.

@StreakyCobra
Copy link

I think this is a problem with Flow-router, will investigate.

It's very nice of you @mquandalle to look at this. I wouldn't be able to do it myself. Many thanks for your help, and your project 😊

@mquandalle
Copy link
Contributor

Hopefully, kadirahq/flow-router#329 should fix the issue.

@StreakyCobra
Copy link

Amazing 👍 I'll wait for it to be merged for testing... because I'm not used to JS dev and I don't know how to test it right now. Thanks again (especially for working until 3 am 😉 )!

@StreakyCobra
Copy link

I noticed a solution has been merged in flow-router (kadirahq/flow-router#329 (comment)). Let us know when this will be available in/from the docker image! Congrats and thanks for you job 👍

@mquandalle
Copy link
Contributor

Here it is! I don’t plan to release a new version in the following days so if you need this feature sooner @StreakyCobra I encourage you to create the container directly from the source. It should be as simple as:

$ git clone --depth 1 https://github.com/wekan/wekan.git
$ cd wekan
$ docker build -t StreakyCobra/wekan .

@StreakyCobra
Copy link

It's already building ;-)

@StreakyCobra
Copy link

Hum, it's locked at:

Downloading Meteor distribution

Meteor 1.2.0.2 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.

To get started fast:

  $ meteor create ~/my_cool_app
  $ cd ~/my_cool_app
  $ meteor

Or see the docs at:

  docs.meteor.com

@mquandalle
Copy link
Contributor

Let me take a look

@StreakyCobra
Copy link

Weird, it seems to have been build finally when I pressed CTRL-C... It works right now. Thanks for you amazing work 😄 It's late here, I'll have a closer look next week probably.

@mquandalle
Copy link
Contributor

You’re welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants