Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content

App Packaging & Development

App package development & help

272 Topics 2.5k Posts

Subcategories


  • Looking to collaborate? Post here if you need help or willing to offer help.

    36 274
    36 Topics
    274 Posts
    BrutalBirdieB
    Hello @morgi and Welcome to the Cloudron Forum! I have many years of experience with Cloudron and hosting. Would be happy to help and can even offer a full monitoring solution that would notify you if something is happening or even before it gets critical. Including dashboard access to full statistics like Docker System, file system, Networking, System performance, website overview (selenium smoke tests etc.) and to some extend Cloudron API monitoring. This could also be extended if something else is needed. If you would like to discuss this further you can send me a dm in the forum. You can find more bout me here: https://keyoxide.org/3EFABCB708412AEE165EDC6C7B17D07087F79F9E https://www.hackradt.com/posts/1750792477727-about-me Feel free to contact me in the medium you like most. In keyoxide my Mail, Discord and Matrix/Element is verified. Also including my PGP key, if you'd like encrypted mail conversations. To be fair to everyone, tagging the @partner group. In case you need a full contract with SLA and response times, I would suggest you get in touch with @luckow (also a partner) His company and staff have many years of experience with Cloudron hosting and services all around Cloudron. ~Cheers
  • Crontab not running in custom LAMP

    Moved
    13
    1 Votes
    13 Posts
    2k Views
    girishG
    @alex-uxlabsmx should work now. there were a couple of issues in the crontab: '&' in the end of the cron line. this puts the command in the background. cronjobs are not run in background and instead run on a schedule. so, the '&' should be removed. 'source' command is a bash primitive. you have to wrap it in bash -c "source ... && anothercommand", for example seems to work after that.
  • read-only file system, rmdir '/dist'

    Moved
    8
    1 Votes
    8 Posts
    2k Views
    nebulonN
    I am not familiar with how nestjs works during startup, but something tries to wholesale rm the /dist folder. I guess it tries to rebuild the app on startup? You may have to copy the app from read-only to /run first thing in start.sh and then start the app and not symlink the folder? Just a guess though.
  • Update app : Read-only file system

    Moved Solved
    8
    1 Votes
    8 Posts
    1k Views
    J
    Glad you got it sorted out!
  • Langfuse packaging issue

    1
    0 Votes
    1 Posts
    156 Views
    No one has replied
  • How to package third-party apps, with example

    5
    1 Votes
    5 Posts
    819 Views
    E
    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.
  • App packaging tip for easier building

    4
    4 Votes
    4 Posts
    758 Views
    LanhildL
    @girish To make it more clear, I have made a template repository with all the files and scripts I usually use for my Cloudron apps. In the future, we might benefit from adopting such a strategy for the Cloudron CLI init script by using these files as a template/starter Cloudron app project. It'd make maintenance easier, more uniform, and make the process less daunting for new app devs. https://github.com/Lanhild/starter-cloudron
  • Multi-Stage Dockerfiles

    10
    5 Votes
    10 Posts
    2k Views
    girishG
    @Lanhild yup, we already started using multi-stage builds by now. For app store, you have to pin the images though. Using ":latest" is not good will have to be changed.
  • Question about app versions updates

    Solved
    4
    1
    1 Votes
    4 Posts
    637 Views
    LanhildL
    Got it. Thanks for the answer!
  • App wishlist - raw data

    4
    3 Votes
    4 Posts
    714 Views
    E
    @girish scroll and copy > chatgpt
  • 1 Votes
    1 Posts
    253 Views
    No one has replied
  • Help needed to package KoboToolBox & iHRIS V5 apps

    2
    0 Votes
    2 Posts
    331 Views
    necrevistonnezrN
    There‘s a whole category for that: https://forum.cloudron.io/category/5/app-wishlist I‘d suggest creating one topic per app. If your app generates enough interest, some kind soul might gift you (and us) with their spare time
  • Put reverse-proxy in front of arbitrary apps

    4
    1 Votes
    4 Posts
    791 Views
    nebulonN
    It would reach it via the public domain I would guess, so it is not dependent on the local docker network addresses. All this is not an elegant solution for sure but to have this well supported we would need to have a quite sophisticated reverseproxy/nginx config UI somehow.
  • Pocketbase packaging

    4
    1 Votes
    4 Posts
    822 Views
    T
    i have to test it in production so i've done it here : https://git.cloudron.io/nils/pocketbase i may improve this package ,handling Cloudron user management and email configuration if people or i find interest in it .
  • Postgres Addon

    Moved addons
    9
    1 Votes
    9 Posts
    2k Views
    girishG
    @ekevu123 yes, of course, you add do whatever you want in that database (it's no different from an doing whatever it wants with the database). There is a guide to connect via ssh - https://docs.cloudron.io/guides/connect-postgresql/
  • install custom app via private registry and cloudron build

    7
    4 Votes
    7 Posts
    2k Views
    bmannB
    @rosano woo hoo! Thanks for this not having to learn much of Docker tutorial!
  • How to deploy NextJs app via cloudron to the subdomain?

    6
    0 Votes
    6 Posts
    1k Views
    klawitterbK
    So here's a little sum up how I do it: Create dockerfile ARG nodeversion=21-bullseye # build stage using standard node container FROM docker.io/node:$nodeversion AS builder WORKDIR /app # copy & install dependencies COPY package.json yarn.lock .yarnrc.yml ./ COPY .yarn/ .yarn RUN yarn install # copy source code & build COPY . . ENV NODE_ENV=production RUN yarn build --standalone # use cloudron base image for running the app FROM docker.io/cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df WORKDIR /app ENV NODE_ENV=production # copy built files COPY --from=builder ./app/.output ./.output/ # start script for execution of the app, make sure its executable COPY --from=builder ./app/start.sh ./ RUN chmod +x /app/start.sh # set the port and host and expose the port ENV HOST 0.0.0.0 ENV PORT 8000 EXPOSE 8000 # start the app using start script CMD [ "/app/start.sh"] Create start.sh #!/bin/bash set -eu # set any environment variables here, e.g. database connection details # run the server node .output/server/index.mjs Create CloudronManifest.json Nothing special here, follow documentation from Cloudron, set app details, add addons, set exposed port, etc. Create CI/CD pipeline This depends a bit on your runner setup, I'm using a custom gitlab runner package on Cloudron I build for myself + the cloudron build service app. This has some quirks but works for me. Its a docker in docker runner but without access to the docker.sock its not possible to run docker commands itself (or at least didn't figure out how). Normally you'd need access to the docker.sock which is not possible with app packages and a security risk. Nevertheless here's a sample of my .gitlab-ci.yml stages: - stage deploy_stage: stage: stage image: node:19 environment: name: STAGE variables: BUILD_SERVICE: 'https://builderbot.serverdomain.de' FQ_IMAGE_NAME: 'docker.serverdomain.de/imagepath' TAG: pre only: - main script: - npm install -g cloudron - cloudron build --tag $TAG --set-build-service $BUILD_SERVICE --set-repository $FQ_IMAGE_NAME --build-service-token $CI_BUILD_SERVICE_TOKEN - cloudron update --server my.serverdomain.de --token $CI_CLOUDRON_TOKEN --app appsubdomain.serverdomain.de --image docker.serverdomain.de/imagepath:$TAG #- cloudron install --server my.serverdomain.de --token $CI_CLOUDRON_TOKEN --location appsubdomain.serverdomain.de --image docker.serverdomain.de/imagepath:$TAG For first run you need to use install cli cmd and afterwards update. Hence I always keep it commented out in the pipeline in case I need to reinstall the app from scratch. A combined command for this would be brilliant *hint *hint @girish Apart from that there's a little more to it in terms of one time setup which I ommited: Setup private docker registry in Cloudron (alternative use a public registry) Register the gitlab runner in gitlab Setup secrets in gitlab, e.g. Cloudron access tokens might be more I've forgotten, as always once setup things get blurry in memory
  • How to create additional postgresql role's needed for an application?

    5
    1 Votes
    5 Posts
    983 Views
    girishG
    @ChristopherMag great for exploring this further! Since roles are database global, installing/clone etc will cause conflicts. So, we have to have some elaborate scheme to accommodate this. This is quite complicated right now because only this specific app needs this. But TBF, if an app needs custom roles etc, it requires complete control of the database and Cloudron is probably not best suited for this at the moment.
  • Install Docker Compose apps

    1
    1 Votes
    1 Posts
    235 Views
    No one has replied
  • OpenId Connect on custom web apps

    3
    2
    1 Votes
    3 Posts
    596 Views
    R
    Is planned to unlock the provide for front app ?
  • LiveView Elixir doesn't work in Cloudron but does locally

    Moved
    10
    1 Votes
    10 Posts
    2k Views
    E
    Yes, makes sense, I am asking in the elixir forum. Thank you still for being here!