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

277 Topics 2.5k Posts

Subcategories


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

    36 276
    36 Topics
    276 Posts
    robiR
    Make sure to try them with CCAI
  • 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
    1k 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
    257 Views
    No one has replied
  • OpenId Connect on custom web apps

    3
    2
    1 Votes
    3 Posts
    687 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!
  • Cloudron update vs. installation - custom app

    Moved
    2
    1 Votes
    2 Posts
    499 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
    690 Views
    LanhildL
    @girish That was it, thanks
  • Custom app: docker volume mapping

    Moved
    13
    1
    1 Votes
    13 Posts
    2k Views
    BrutalBirdieB
    Still, a Cloudron App should not need a volume by default.
  • ngrok alternatives / awesome tunneling

    7
    3 Votes
    7 Posts
    2k Views
    robiR
    boringproxy has a UI now and free subdomains
  • Redbean - single-file distributable web server

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

    1
    0 Votes
    1 Posts
    295 Views
    No one has replied
  • ECONNREFUSED Error Installing Custom Docker Image

    Moved
    9
    1 Votes
    9 Posts
    2k Views
    M
    @girish Very cool, looking forward to it . When do you think will the release be available? Thank you cloudron team!
  • Process of getting into the AppStore

    Moved
    9
    0 Votes
    9 Posts
    2k Views
    philkunzP
    ... In a way. We are developing our own solution now, that uses Synology as a base for on premise installations.
  • use of Docker addon

    2
    0 Votes
    2 Posts
    525 Views
    girishG
    You get access to docker. There is an env var injected into the app. See https://docs.cloudron.io/packaging/addons/#docker . Generally, don't use it. If you are using it, it means you are trying to access docker which is a bit of security hole. This was created mostly out of necessity and maybe for "playing" . But once you give an app access to docker, it can pretty much do anything on host.
  • UTM - run VMs on iOS Phones, Tablets & Macs

    4
    2
    2 Votes
    4 Posts
    1k Views
    timconsidineT
    Does side-loading work on Apple devices in UK ? I thought that was in the future. Or this is different to the changes made for EU users to install non-AppStore apps ?
  • Orb Stack

    3
    1
    4 Votes
    3 Posts
    1k Views
    timconsidineT
    @MorganGeek so on mac you just stop docker deskop and install/run orbstack ? I use docker desktop to provide engine to build custom cloudron app packages. Does Orbstack support that ? Always bit nervous of disturbing an existing working environment. I used to use Parallels to run other OS but I stopped subscription as struggled to justify the cost.
  • Cloudron Package Template

    7
    2 Votes
    7 Posts
    2k Views
    KubernetesK
    I have added the easy installer to the repo. This allows users to install the app on Cloudron, if they don't want or know how to build the image themselves.
  • App custom node

    2
    0 Votes
    2 Posts
    493 Views
    nebulonN
    Hi and welcome. For a start your application only listens on localhost:3000 it needs to listen on 0.0.0.0:3000 and then ensure port 3000 is also specified in the CloudronManifest.json
  • This topic is deleted!

    2
    2 Votes
    2 Posts
    62 Views
  • problem installin Cloudron CLI on a linux ubuntu machine (my local machine)

    Moved Solved
    3
    0 Votes
    3 Posts
    409 Views
    M
    ok. this is solved, thanks! i had nodejs installed. it worked today without the "sudo" i dont know why