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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. How I can test my app without Cloudron or How can I check if the container runs on Cloudron

How I can test my app without Cloudron or How can I check if the container runs on Cloudron

Scheduled Pinned Locked Moved Solved App Packaging & Development
3 Posts 2 Posters 659 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    roru2k20
    wrote on last edited by
    #1

    Hey,

    my next Level for Packaging is PrestaShop. There I have the problem, I can't start start.sh with an unbound variable.

    First I build my image with local docker. Second I will test it local, but the container doesn't start because he find undefined variables. I have tested something, but nothing worked.

    if [[ ! -z "${CLOUDRON_APP_DOMAIN:-}" ]]; then
      php install/index_cli.php --domain=${CLOUDRON_APP_DOMAIN} --db_server=${CLOUDRON_MYSQL_HOST} --db_name=${CLOUDRON_MYSQL_DATABASE} --db_user=${CLOUDRON_MYSQL_USERNAME} --db_password=${CLOUDRON_MYSQL_PASSWORD} --country=de --language=de --timezone=Europe/Berlin --name=CloudronPrestaShop --firstname=Cloudron --lastname=PrestaShop --password=$(cat /app/data/prestashop.secret)
    fi
    

    How can I check if the container runs on Cloudron, that I can use CLI installer?
    How can I test my package without Cloudron if it runs at all?

    Thanks!

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      If an app runs on Cloudron then it has a special CLOUDRON=1 environment variable exposed. So you could check on the existence of that.

      1 Reply Last reply
      1
      • R Offline
        R Offline
        roru2k20
        wrote on last edited by
        #3

        Great, this works well.

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search