Server That Only Has One Project?

LabKey Support Forum (Inactive)
Server That Only Has One Project? Ben Bimber  2017-04-26 13:12
Status: Closed
 
We have a new LK instance that exists primarily as a public portal to share one kind of data. It will only have one project. Once the user logs in, they will only ever need to do anything within this single project.

I can turn off most UI related to switching projects; however, dealing with /home is a little awkward. There's 2 main ways I can think to deal with this:

1) Make separate project for our data. Weirdness is that if the user just types in our base URL, LabKey will take them to /home. I could put a simple landing page in /home with a link to our actual project (which I've usually done in this situation), or perhaps make automatic navigation from /home/begin.view -> our module (this seems awkward). Can I make this server treat my project as though is it the 'default' project and redirect here instead of /home?

2) Store all of our data in /home. This would not be a good idea on a multi-project server, but could be OK for this case. I cant change the name of /Home; however, I could probably change the title (if i go direct against the database). I'm sorta temped to try this.

Thanks for any ideas,
Ben
 
 
Matthew Bellew responded:  2017-04-26 13:57
You can put a index.html in extraWebapp that redirects to whatever you want to be your primary home page. Also, change the "logo link" under "look and feel settings".
 
Ben Bimber responded:  2017-04-26 14:04
That's an interesting idea. Is /extraWebapp a folder that I create manually on my server and persists between upgrades, or do I deploy this with a module?

I assume this was designed specifically for this scenario I'm talking about? Are other production installs doing this?
 
Matthew Bellew responded:  2017-04-26 14:11
Several users create custom splash pages this way. see https://www.immunespace.org/ or https://www.itntrialshare.org/. However, you can also just redirect, like LabKey does by default.

see also https://www.labkey.org/Documentation/wiki-page.view?name=robots
 
Jon (LabKey DevOps) responded:  2017-04-26 14:25
We also used the extraWebApp on our own internal LabKey instance too for a time, redirecting users from the home project to another project as the default.
 
Ben Bimber responded:  2017-04-27 14:56
Hi guys,

This /extraWebApp/index.html route seems like the right solution. However, in the scenarios you describe, this is something I deploy separate from deploying my server and modules. Does it have to be? Is there any way to link this content with a module or distribution and deploy it all together?

A relatively easy workaround could be to check in my content somewhere under one of our modules, and have the script that deploys our labkey build do a separate step to check out this other content from SVN to /extraModules. Just thought I'd see if there was a more elegant route.

Thanks.
 
Ben Bimber responded:  2017-04-27 15:14
One related question: I can create /extraWebapp and deploy index.html to it. If I directly request this file (i.e. https://myserver.com/index.html), it works. If I request "https://myserver.com", it redirects to /home/begin.view. What controls the latter?

Also - to my earlier question, it appears a module can supply top-level files in /web, like index.html. so it seems that I could deploy content automatically through a module.
 
jeckels responded:  2017-04-30 09:08
Hi Ben,

While a module can indeed supply top-level files for web content, I'm not sure that it's well-defined which copy wins when there are multiple. The Internal module has the "standard" index.html.

There may be a caching issue where the browser is remembering the previous HTML served up at https://myserver.com. Can you clear the cache and retry?

And no, we don't have a separate mechanism for pulling content from a module into extraWebapp.

Thanks,
Josh
 
Ben Bimber responded:  2017-05-01 10:02
Hi Josh,

Yes, I think it was a caching or similar issue. It does work to put it in a module, but as you note that's also not a great idea since it always will load.

I'm exploring whether I can add a similar feature as already exists to customize the support link (in admin console), to specify a custom welcome page. This would allow the module to provide the page, yet only enable it for your site.