Solved HumHub - social network software
-
@sam_uk well it could be - if you can share the instructions for how to install it on LAMP app, I might could back port that into a custom full blown app.
-
@doodlemania2 I have no experience of running it I'm afraid.
The Lamp instructions are here: https://docs.humhub.org/docs/admin/server-setup/
-
@doodlemania2
It would be wonderful if you could. -
I wonder if Gitcoin could be useful for app bounties?
I posted here: https://forum.cloudron.io/topic/4951/gitcoin-for-app-bounties
I couldn't commit to putting funds in from my organisation yet, but it's something I could explore if there was a transparent way of handling payments.
-
@jdaviescoates @doodlemania2 @kaxline Has anyone done any work on Humhub? I'm pretty keen and may be able to pay if I had an idea of how much work it would be.
-
@sam_uk I'm going to try next week when things at work calm down a bit.
-
@doodlemania2 Great stuff, thanks..
-
All - I wanted to report back and not just be a flake - I've been saddled with a crazy go nuts project at work and won't be able to work on this for a while. I've really very sorry, I had gotten everything loaded and was about to start
I hope another app_dev person can pick this up!
-
@doodlemania2 Ah no worries, thanks for letting us know.
I wonder if @ATRILAHIJI could take a look at it and estimate the work involved?
-
@sam_uk Just to update @atrilahiji is going to take a look at this one over the next couple of weeks.
-
I have it "working" as in it deploys just fine, but it will need manual DB, SMTP, and LDAP config at the moment.
They seem to prefer to route everyone through web UI configuration instead of easy CLI config. Looks like I gotta find what DB entries the config makes and do it manually
-
@atrilahiji Make sure to take advantage of the environment vars inside the container for all CR apps which provide you with full connection details of all associated resources from your manifest.
-
@doodlemania2 Yeah for sure, I'm going to make use of those.
-
I got permission from @Sam_uk to make the repo public:
https://git.atrilahiji.dev/Alt-Ron/cloudron-humhub-appTodo:
- Properly address the update process
- See if its possible to config LDAP and SMTP automatically (this is the part I am really struggling with right now.
-
@atrilahiji said in HumHub - social network software:
this is the part I am really struggling with right now
Did you already have a look at https://github.com/humhub/docker/blob/master/docker-entrypoint.sh ?
-
@fbartels Wowee nope. Good catch lol
EDIT: You know, I have no clue why it never occurred to me that I can look for a docker version of the app.
-
I have finished getting things automated (sort of). The DB is set up on the first install, and the LDAP and SMTP configuration is set up after a re-start (and is updated after every restart).
-
Encountering a snag:
The ONLYOFFICE integration seems to fail to send the JWT token to an ONLYOFFICE instance. My best guess rn is its an issue with apache -> nginx -> ONLYOFFICE. Is anyone else more familiar with this sort of reverse proxy issue?
Edit: Fixed it. Testing and pushing a new release.
Edit 2: I am tempted to leave updating to the app, similar to Wordpress Developer Edition. I auto install the Updater module. If @staff want to take a look at this let me know. Repo is here: https://git.atridad.dev/CTPR/cloudron-humhub-app. It was a sponsored app. If you need an instance to take a look at it let me know via a direct message and I can let you in @staff.
-
@atrilahiji ah, great stuff! Ideally, the app shouldn't update itself and the code should be readonly. Is that possible? It's best to keep updates consistent i.e from Cloudron dashboard.
-
@girish I can definitely try. Much like Moodle, it has a lot of plugins or "modules" people use. I think in this instance they are all in a single directory though. I'll take a look.
-
@atrilahiji thanks! let me know if you hit any bumps and I can take a look as well.
-
@girish Sure, thanks! I'll shuffle some things around in the package and see what I can do. My hope is I can just symlink everything that is needed in a migration to /app/data, which will also make updates a lot easier.
-
@girish Actually, I just thought of something. If the modules folder is symlinked and the app is expecting to write to the modules folder in /app/code, it will error right? I imagine it wouldn't just look at the actual folder in /app/data. The trouble here is there is a "module store" of sorts built right into the app.
-
@atrilahiji maybe you can symlink /app/code/modules to /app/data/modules and that way it will become writable.
To give a high level idea, let's say humhub app comes with some default modules. Then, in Dockerfile, you would move them to some other location like:
RUN mv /app/code/modules /app/code/modules_orig && ln -s /app/data/modules /app/code/modules
Then in start.sh:
mkdir -p /app/code/modules cp -r /app/code/modules_orig/* /app/data/modules
In many apps, instead of the blind copy above, we try to symlink each "module". So, there will be a symlink from /app/data/modules/x to /app/code/modules_orig/x . This sometimes works or not depending on the app. But hopefully you get the idea!
-
@girish my confusion here is if the app still tries to write to /app/code/modules it would hit permissions issues no?
-
@girish Running into issues here: https://docs.humhub.org/docs/admin/installation/#file-permissions
There appears to be no way to configure where Hubhub looks for those files, so it will just keep trying to write to the symlink in /app/code and fail. In fact, you cant even get the site to load after installation without having the assets directory writable. This is something it has to do on startup. I can still make an update script for this, but I think it will have to sit in /app/data just based on how this was written. Unless I'm missing something?
-
@atrilahiji said in HumHub - social network software:
if the app still tries to write to /app/code/modules it would hit permissions issues no?
no, that should not be the case (at least when the symlinked dir has proper permissions for this).
-
@fbartels Weird... it seemed to think it didn't have permission to write...
-
-
@atrilahiji Never stop never stopping! You're doing great!
-
@atrilahiji can you push your current wip? I'd like to give the code a look.
-
@fbartels Sure thing: https://git.atridad.dev/alt-ron/cloudron-humhub-app/-/tree/harden-app-code
Thanks! I'm convinced this is 1) impossible or 2) something so simple yet I have not noticed it somehow
-
@atrilahiji for me this works with
➜ cloudron-humhub-app git:(harden-app-code) git rev-parse --short HEAD 0b5df1c
Steps I tried:
- Install app (in debug mode, but only so that i could override and start the
start.sh
manually) - finished Humhub installation
- went into admin and selected modules
- installed a module
- activated a module
- no php error can be seen
- Install app (in debug mode, but only so that i could override and start the
-
-
@atrilahiji no, no changes at all. maybe some leftovers from a previous installation of yours?
Yes, you can run
cloudron install --debug
where then the init script is not run. you then need to exec into the app and run it manually. -
@fbartels ahhh I see what you mean. I'll try that.
-
@fbartels Oh weird yeah that works... no clue why it wouldn't work if the start.sh is run normally during an install...
IDK if you saw the same error but if I don't start in debug mode and switch to Recovery Mode, running start.sh results in a permission error for PHP again.
EDIT: Nvm I think I figured it out... -
@atrilahiji ah nevermind, i forgot that part of debug is that the container is not read-only. Looking at the code now a bit closer.
-
@atrilahiji the modules directory does not exist at all in
/app/code
and then it fails at creating it in the first place. You have to prepare this in a similar way to https://git.atridad.dev/alt-ron/cloudron-humhub-app/-/blob/harden-app-code/Dockerfile#L78-80 where the folder symlink needs to already be created during docker build and then in start.sh you need to make sure that the folder and its default contents exist. -
@fbartels I think I got it working finally. I'll test it one more time and then push the code up.
-
This should work now: https://git.atridad.dev/alt-ron/cloudron-humhub-app/-/releases/0.8.0
Now to tackle updates. With everything we need in /app/data now it should be a piece of cake. Thanks for the help @fbartels !
-
@atrilahiji yes, now it also starts in normal (non debug) mode. A nice addition would be auto configuration of ldap.
-
@fbartels I thought I had that set up, but I might have broken it. I'll look into it.
-
@fbartels AH so it does, but on restart. The reason being is it does not let me configure LDAP until the app is installed in the ui on first boot.
Testing both new installs and updates right now for a 1.0.0 release.
-
Had a few dumb bugs, and here we are at 1.0.3. But hey it works. Now I know never to work on windows. The line endings being wrong fucked the package.
-
@atridad I'm getting a cert error on your repo.
-
@sam_uk I think https://git.atridad.dev/CTPR/cloudron-humhub-app is the new location
-
@sam_uk Whoops yeah, I had not mentioned in an email that I moved things to a new org on my gitlab. Mostly because I didn't like how Altron just sounded like the marvel villain
-
I've also been getting in the habit of storing my containers I built over on my gitlab registry. So that project should now have an image built for 1.1.0 of the package.
-
@girish Great thanks. What are the next steps for getting this in the app store, please?
-
@sam_uk @girish Just pushed a new release that fixes a huge issue. The DB credentials never got updated when you clone from backup, so you'd end up with 2 instances connected to the same DB.
1.1.1 is pushed now.
Repo: https://git.atridad.dev/CTPR/cloudron-humhub-app
Container: docker.atridad.dev:443/ctpr/cloudron-humhub-app:1.1.1 -
@atridad @girish I'm looking forward to having this in the app store... I'm guessing that might happen sometime soon?
-
Wonderfully promising - thanks a kazillion @atridad
Really looking forward to this. Any news on when this might land in the app store @girish?
-
@toja I'll throw my vote in here for that as well. The fewer production apps that depend on my docker instance the better
-
@atridad @girish is there a timeline for getting this in the app store?
I've been using it for a while and it seems to work OK.
-
-
-
@atridad what's the location?
-
@atridad yeah, it seems the git repo is a broken link now. What's the new location ?
-
@girish AFAIK the latest is here: https://github.com/atridadl/cloudron-humhub-app