Some downloads during the build process were interrupted due to network issues. Can this be optimized?

For example, when downloading acme.sh, it often hangs due to network issues. Optimization plan:

  1. Consider bundling this script (even if it’s not the latest version)
  2. Do not interrupt the entire build process; instead, provide a quick command to copy it in from outside the container for fixing the issue after the build.

Hi there, do the suggestions mentioned in here help?

Yes, very helpful. Thank you.

It would be even better if we could add a DISCOURSE_ACME_DOWNLOAD_URL variable, so it can be overridden in app.yml without worrying about git pull conflicts.

env:
  DISCOURSE_FORCE_HTTPS: true
  # add DISCOURSE_ACME_DOWNLOAD_URL
  DISCOURSE_ACME_DOWNLOAD_URL: https://raw.githubusercontent.com/acmesh-official/acme.sh/3.0.6/acme.sh
run:
  - exec:
      cmd:
        - curl "$DISCOURSE_ACME_DOWNLOAD_URL" > /opt/acme.sh
        - chmod +x /opt/acme.sh
  - file:
      path: "/usr/local/bin/configure-letsencrypt"
      chmod: "+x"
      contents: |
        #!/bin/bash
        touch /var/spool/cron/crontabs/root
        LETSENCRYPT_DIR="/shared/letsencrypt"
        install -d -m 0755 -g root -o root $LETSENCRYPT_DIR
        cd /opt