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

225 Topics 2.2k Posts

Subcategories


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

    31 Topics
    249 Posts
    fbartelsF

    Just doing a local build of your repo (outside of Cloudron) and modifying your start.sh so that output is done to the container, it reports as running on port 8000 (on localhost, but also globally). /healtcheck does not seem to exist (gives a 404), but / gives a 200 for me. On the browser however it just loads endlessly.

    Looking at the devtools on Chrome it tries to load a service worker (worker.js) which only gives a 404, but would anyways need https to function properly.

  • App contributions hall of fame

    Pinned Moved
    41
    11 Votes
    41 Posts
    3k Views
    girishG

    @Lanhild I added you to the App Dev group. I think you have to go to your profile and set something to get the badge.

  • Translators hall of fame

    Pinned Moved
    25
    15 Votes
    25 Posts
    1k Views
    nebulonN

    Public registration is off on that, but we do add language maintainers manually if needed. See https://docs.cloudron.io/i18n/#maintaining-translations

    Since we have native German speakers on the team, we are maintaining that internally, however you can suggest changes via the weblate instance for any strings and I will review those then.

  • Read first before starting to package an app

    Pinned
    10
    8 Votes
    10 Posts
    2k Views
    nebulonN

    I guess the current link would be https://docs.cloudron.io/packaging/tutorial/

  • Building custom packages

    Pinned
    4
    4 Votes
    4 Posts
    1k Views
    timconsidineT

    @ericsanchez

    the cloudron CLI needs to be installed on your local machine (not the server)

    yes you can put app.otherdomain.com as the location providing otherdomain.com has been added to Domains & Certs

    Docker needs to be installed on your local machine for the app building/packaging process

    custom builds can use cloudron's MySQL if you specify it as an add-on in the CloudronManifest.json for the app you are building. You will need to reference the credentials in the Dockerfile you are building.

  • Writing automated tests for packages

    Pinned
    12
    8 Votes
    12 Posts
    865 Views
    BrutalBirdieB

    @nebulon Yea I just wanted to reply never mind, I copied the tests from the alltube app which do not even use selenium so yeeaa my mistake.

    Now I took the nextcloud tests and will learn from them šŸ™‚

  • Cloudron Non-App Store Packaged Apps

    Pinned
    27
    11 Votes
    27 Posts
    2k Views
    T

    @matbrgz added to the post at the top!

  • Multi-Stage Dockerfiles

    6
    2 Votes
    6 Posts
    66 Views
    klawitterbK

    Iā€™m using multi stage dockerfiles for my projects, works like a charm. Only for final stage I use the cloudron base image.

  • 4 Votes
    7 Posts
    195 Views
    bmannB

    @rosano woo hoo! Thanks for this not having to learn much of Docker tutorial!

  • 0 Votes
    6 Posts
    96 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 šŸ™‚
  • 1 Votes
    5 Posts
    118 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
    37 Views
    No one has replied
  • OpenId Connect on custom web apps

    3
    1 Votes
    3 Posts
    42 Views
    R

    Is planned to unlock the provide for front app ?

  • 1 Votes
    10 Posts
    192 Views
    E

    Yes, makes sense, I am asking in the elixir forum. Thank you still for being here!

  • Installing custom Apps on Cloudron

    41
    6 Votes
    41 Posts
    1k Views
    LanhildL

    @necrevistonnezr šŸ‘

    Often, there are also app-specific questions that are not related to the app itself but directly to the upstream. That's not exclusive to Cloudron, it also happens all the time in IT.

  • Cloudron update vs. installation - custom app

    Moved
    2
    1 Votes
    2 Posts
    67 Views
    BrutalBirdieB

    To answer your question truly I would need to see the code of the custom Cloudron app, how it is packaged.
    If you update an app with cloudron update the Dockerimage on the system and /app/code and all read only parts get updated.
    If your .env file is in a location where it is read write e.g. /app/data this will not be deleted on app update, thankfully!

  • 1 Votes
    3 Posts
    89 Views
    LanhildL

    @girish That was it, thanks

  • Custom app: docker volume mapping

    Moved
    13
    1 Votes
    13 Posts
    202 Views
    BrutalBirdieB

    Still, a Cloudron App should not need a volume by default.

  • ngrok alternatives / awesome tunneling

    7
    3 Votes
    7 Posts
    689 Views
    robiR

    boringproxy has a UI now and free subdomains

  • Redbean - single-file distributable web server

    1
    2 Votes
    1 Posts
    57 Views
    No one has replied
  • Ollama-webui - help needed

    1
    0 Votes
    1 Posts
    71 Views
    No one has replied