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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

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

    App Packaging & Development
    2
    3
    157
    Loading More Posts
    • 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
      roru2k20 last edited by

      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 Reply Quote 1
      • nebulon
        nebulon Staff last edited by

        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 Reply Quote 1
        • R
          roru2k20 last edited by

          Great, this works well.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Powered by NodeBB