Issues with Discourse Migration and App Startup

I’m currently in the process of migrating my Discourse forum from one server to another. Both servers are running Linux CentOS 7.9.
I have followed the steps to bootstrap the app using ./launcher bootstrap app, but I encountered the following error:

I, [2023-06-17T17:15:58.122571 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2023-06-17T17:16:00.306019 #1]  INFO -- : docker_manager is already at latest compatible version

I, [2023-06-17T17:16:00.307142 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
[docker_manager] Handlebars templates can no longer be included via `register_asset`.
Any hbs files under `assets/javascripts` will be automatically compiled and included."
/var/www/discourse/lib/plugin/instance.rb:638:in `register_asset'
...

It seems that there is an issue with the Docker Manager plugin and the handlebars templates. I’m not sure how to proceed and resolve this error. Could someone please guide me on how to fix this?

In the meantime, I decided to copy the local_discourse/app image from the original server to the new server. I used ./launcher start app to start the application, but I encountered another error:

I, [2023-06-18T11:24:51.537970 #1]  INFO -- : Reading from stdin
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:14:in `block in initialize': undefined method `has_key?' for nil:NilClass (NoMethodError)
['env_template', 'env', 'labels', 'params'].each { |key| @config[key] = {} unless @config.has_key?(key) }
                                                                                         
...

It seems that there is an issue with the Pups configuration related to the env_template, env, labels, and params keys. This error is preventing the app from starting properly.

I’m feeling stuck and unsure about how to proceed. If anyone has encountered similar issues during Discourse migration or app startup, I would greatly appreciate your assistance. Please let me know if you have any suggestions or solutions.

Thank you in advance for your help!

bootstrap app:

I, [2023-06-17T17:15:58.122571 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2023-06-17T17:16:00.306019 #1]  INFO -- : docker_manager is already at latest compatible version

I, [2023-06-17T17:16:00.307142 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
[docker_manager] Handlebars templates can no longer be included via `register_asset`.
Any hbs files under `assets/javascripts` will be automatically compiled and included."
/var/www/discourse/lib/plugin/instance.rb:638:in `register_asset'
/var/www/discourse/plugins/docker_manager/plugin.rb:29:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:730:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:730:in `activate!'
/var/www/discourse/lib/discourse.rb:346:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:343:in `each'
/var/www/discourse/lib/discourse.rb:343:in `activate_plugins!'
/var/www/discourse/config/application.rb:215:in `block in <class:Application>'
/var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
/var/www/discourse/config/application.rb:215:in `<class:Application>'
/var/www/discourse/config/application.rb:75:in `<module:Discourse>'
/var/www/discourse/config/application.rb:74:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `require'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
(See full trace by running task with --trace)
I, [2023-06-17T17:16:01.381158 #1]  INFO -- : 
I, [2023-06-17T17:16:01.382053 #1]  INFO -- : Terminating async processes
I, [2023-06-17T17:16:01.382604 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
I, [2023-06-17T17:16:01.383169 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
2023-06-17 17:16:01.383 UTC [42] LOG:  received fast shutdown request
103:signal-handler (1687022161) Received SIGTERM scheduling shutdown...
2023-06-17 17:16:01.396 UTC [42] LOG:  aborting any active transactions
2023-06-17 17:16:01.400 UTC [42] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2023-06-17 17:16:01.401 UTC [46] LOG:  shutting down
2023-06-17 17:16:01.411 UTC [42] LOG:  database system is shut down
103:M 17 Jun 2023 17:16:01.435 # User requested shutdown...
103:M 17 Jun 2023 17:16:01.436 * Saving the final RDB snapshot before exiting.
103:M 17 Jun 2023 17:16:01.439 * DB saved on disk
103:M 17 Jun 2023 17:16:01.439 # Redis is now ready to exit, bye bye...
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 814 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

start app:

I, [2023-06-18T11:24:51.537970 #1]  INFO -- : Reading from stdin
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:14:in `block in initialize': undefined method `has_key?' for nil:NilClass (NoMethodError)

      ['env_template', 'env', 'labels', 'params'].each { |key| @config[key] = {} unless @config.has_key?(key) }
                                                                                               ^^^^^^^^^
	from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:14:in `each'
	from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:14:in `initialize'
	from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/cli.rb:55:in `new'
	from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/cli.rb:55:in `run'
	from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/bin/pups:9:in `'
	from /usr/local/bin/pups:25:in `load'
	from /usr/local/bin/pups:25:in `

Did you ever solve this? I’m having the same issue