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

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

  • Hey,

    my next Level for Packaging is PrestaShop. There I have the problem, I can't start 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)

    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?


  • Staff

    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.

  • Great, this works well.