Error Trying to Start Import Process - Xenforo to Discourse

Try this:

(cd /var/www/discourse && RAILS_ENV=production sudo -H -E -u discourse bundle exec ruby script/import_scripts/xenforo.rb)

based off discourse_docker/templates/web.template.yml at master · discourse/discourse_docker · GitHub