Loomio

Directory install

Joshua Walker PublicSeen by 365

Hello,

Is it possible to install Loomio with the URL being a directory instead of subdomain? My situation is that I have to operate under a subdomain already and the installation guide creates another subdomain, so the URL looks something like (loomio.subdomain.domain.org.nz) which isn't really ideal. I would prefer 'subdomain.domain.org.nz/loomio' – is that possible?

Thanks for your help!

Denjello

/etc/apache2/sites-available ?

Robert Guthrie

@youthdeclarationco I would love to know what your list of customisations is.

We really want to support customising the app to include your own branding without losing core loomio branding in the process.

The idea is to make it clear to users who is responsible for the installation they are using and where they can find out more about Loomio.

Joshua Walker

@robertguthrie Do you have a personal email I could contact you on?

I went the whole hog with removing Loomio references, just to see the extent to which that was possible, with a plan to put back a footer link to Loomio on every page (or something to that end).

Robert Guthrie

@youthdeclarationco we've just done some work to around identifying 3rd party loomio installs.

Do you think you could push your changes into a github branch, so we can see all the places as a diff?

Robert Guthrie

What I would like to do is make a nice list of things that people usually want to customise with their Loomio install.

@youthdeclarationco check out the customisation support we've just merged into master. It includes support for using your hostname in the email footers and stuff.

Robert Guthrie

Looks wonderful. Thanks for letting us know!

Nikolai Gad

So what was the answer to the original question regarding installing Loomio in a subdirectory instead of a subdomain? This is causing me a bit of problems now as well. Ideally I would run it on a subdomain and I'm still looking into this, but unfortunately it might not be up to me.

Also, @robertguthrie where do I find that customisation support you mention was merged into the master a year ago? I don't want to make massive customisations, but I'm very interested in playing around to see what's possible :-)

Thanks a lot!

Robert Guthrie

Hi @nikolaigad.

I don't think it's possible to install Loomio on a subdirectory and I would not recommend you try that. Sorry!

As for customisation support, we now have a great plugin architecture which allows to to add or modify almost anything in Loomio while keeping all your work seperate of the main Loomio codebase.

You can read about creating plugins here:
https://github.com/loomio/loomio/blob/master/plugins/README.md

It's also worth knowing that documentation is a focus of the sprint we're working on right now and we'll have new deployment guide and updated tech-manual released next week, all going well.

Nikolai Gad

Ahh I see. Don't be sorry though. That just gave me the final argument to convince our webmaster that I needed a subdomain :-)

Nikolai Gad

@robertguthrie Uhh that looks very useful. I'll have a look at that. I just got all the most essential things working today though with a little help from your docker branch of the core Git repository. The bundle exec rake assets:precompile line of your Docker file did a lot of the trick for me. I still have to manually copy the development directory in the public/client folder into a new folder though.

Robert Guthrie

@nikolaigad I'm not sure what you're still copying.. can you paste the command?

Nikolai Gad

Sure.
So the last three commands I run in my docker file now looks like this:
```
bundle exec rake assets:precompile

cp -r public/client/development/ public/client/0.19.87

bundle exec puma -C config/puma.rb
```

I got the idea to copy the development directory from the deploy rake file (lib/tasks/deploy.rake) which seems to do something similar. Before this the site wouldn't be able to find and load any css or js files when I set the RACKS_ENV and RAIL_ENV environment variables to 'production' although it worked fine when these environment variables was not set (which then caused other problems though).
I guess this is due to the Angular app not being build properly when I run my gulp command. In the readme file in the Angular directory it says I should use the gulp deploy command to build all assets and place them in the public folder, but when I try this I get an error and as far as I could see in the code no 'deploy' command is defined so this makes sense. So this is what I did to build angular in my docker file instead, but this might not be what I was suppose to:

RUN cd angular &&\
bash -c 'source /usr/local/.nvm/nvm.sh && npm install -g gulp'
RUN cd angular &&\
bash -c 'source /usr/local/.nvm/nvm.sh && npm install'
RUN cd angular &&\
bash -c 'source /usr/local/.nvm/nvm.sh && gulp compile'

In the end it all seems to work fine now though (except from emails, but that is a separate issue that I'm working on now :) ) I'll try to clean up my docker file and share it with you if you're interested.

Nikolai Gad

@robertguthrie So I had a go with your new deploy instructions. Looks good, but I couldn't really test it properly, though, since we run everything through Dokku so ideally all settings should be done in one docker file and I can't really figure out how Docker-compose and Dokku works together.
All the scripts seemed to work fine when I ran them on my local machine and in the end I had three docker containers running with postgres, mailin and loomio. Not so surprising it didn't actually work locally, but it was quite easy to follow your instructions. One small error I noticed though: Under "Setup SMTP" I think it should say nano env instead of nano config/env

Robert Guthrie

@nikolaigad thanks for giving it a go. Are you deploying other apps with dokku? Or do you have existing data in a dokku managed database?

Nikolai Gad

@robertguthrie Yes I think we have 20+ things running with dokku at the moment, but it will probably increase as we just recently started to try to run everything through dokku. Right now I run the postgres database in a separate dokku container, but my plan was to move to a dokku independent db as soon as we get a postgres server up and running, as I don't want to accidentally wipe the database if I push to that dokku container.