How to package third-party apps, with example
-
I am not super skilled at packaging, but I would like to learn more.
Let's say I would want to self-host this app on Cloudron, which has two options, the local source code and the docker compose option.
Can I simply package the source code with a Cloudron Manifest and a Dockerfile, configure perhaps the postgres and redis addons, and then potentially run it?
Or does this require a bigger operation within the source code?
And what does it depend on, if I can modify an app to run on Cloudron or not? Also, would this be very bad to re-package an app that was meant to use docker compose for a cloudron app, except of the obvious "I cannot scale different parts of the app independently"?
Maybe I can also understand the work of the people running the cloudron app store better this way
-
Have you looked into https://docs.cloudron.io/packaging/tutorial/ ?
-
@ekevu123 said in How to package third-party apps, with example:
Can I simply package the source code with a Cloudron Manifest and a Dockerfile, configure perhaps the postgres and redis addons, and then potentially run it?
yes, that's pretty much what Cloudron packaging is.
Or does this require a bigger operation within the source code?
I guess you are asking if you have to patch the source code? Then the answer is no. In fact, patching upstream code is heavily discouraged and simply not done (for packages published in the app store).
Also, would this be very bad to re-package an app that was meant to use docker compose for a cloudron app, except of the obvious "I cannot scale different parts of the app independently"?
The compose file is at https://github.com/langgenius/dify/tree/main/docker . For a start, you should check what deps they require (like do they need a specific database and/or extensions). If they require very specific things, it would not be a good candidate for Cloudron . Most apps are flexible but this one is a LLM app, those things have crazy db and software requirements.
-
Thank you for the detailed response! Since this app doesn't run the LLM itself, the system requirements are less heavy.
But wouldn't everything that wasn't attached to Cloudron just run inside the container? I mean, let's say I write a dockerfile for this app, but "forget" to use the postgres addon of cloudron. Wouldn't the app still run, but with the database inside the app, so it would be overwritten upon updating?
Other than that, this app seems to have a sandbox container and one for vector databases, which couldn't be rebuilt easily in Cloudron.