I worked as follows:
followed Using Docker container
- standard install discourse.(discourse/INSTALL-cloud.md at main · discourse/discourse · GitHub)
- download mysql docker and upload my vBulletin database to there.
I checked it using <root@localhost:/opt/discourse# mysql -h 172.17.0.5 -P 3306 --protocol=tcp -u root -p> command. - root@localhost:/opt/discourse#./launcer enter app
- apt-get update && apt-get install libmysqlclient-dev mysql-server-5.7 failed.
so i installed apt-get update && apt-get install libmariadb-dev mariadb-server - I can not run mysql on docker.
root@localhost-app:/var/www/discourse# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld /mysqld.sock' (2)
There are no mysqld.sock on entire docker directorys. could not find by command.
root@localhost-app:/var/www/discourse# sudo service mysql start
mysql: unrecognized service
- I referenced https://www.baeldung.com/docker-cant-connect-local-mysql and used mysql docker image on “172.17.0.5”
gem install mysql2
gem install php_serialize
<gem install mysql2> was not work until libmariadb-dev installed.
- run
su discourse -c 'bundle install --no-deployment --without test --without development --path vendor/bundle'
there was error, So I erased gemfile.lock and .bundle file and tried again.
9. After that I tried.
export DB_NAME="vb3" # Change this to the name of VB3 database.
export DB_USER="root"
export DB_PASSWORD="mypassword"
export DB_HOST="172.17.0.5"
cd /var/www/discourse
su discourse -c 'bundle exec ruby script/import_scripts/vbulletin.rb'
But script generate error.
1: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-3.0.0/lib/mini_profiler/profiling_methods.rb:83:in `profile_method'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-3.0.0/lib/mini_profiler/profiling_methods.rb:83:in `alias_method': undefined method `call' for class `Redis::Client' (NameError)
Did you mean? caller
How can I fix it?
Thank you.