Sudo docker commit <container id> name
sudo docker save name>name.tar
sudo docker load<name.tar
I cloned the appserver and webserver from chimera-lms(google cloud) into linode production and cloned the database from testing (172.104.171.218) machine which is running on linode
I didn't clone the database from google cloud machine beacuse it wasn't running on mariadb
Me and jana configured mariadb on the testing(172.104.171.218) machine using the ubuntu container because there wasn't any mariadb docker image for ubuntu it was only available for debian.
So I cloned the database from there
Creating container with port for mariadb
sudo docker run -it -h dbmc-mysql-node --ip 172.18.0.5 --add-host dbmc-appserver-node:172.18.0.2 --add-host dbmc-webserver-node:172.18.0.6 -p 0.0.0.0:3306:9377 --net dbmc-net -v /root/mysql-mariadb:/var/lib/mariadb --name database -e MYSQL_ROOT_PASSWORD=password -d database
Then I gave chmod -R 777 permission for /var/lib/mysql folder
Then I changed the bind-address from 127.0.0.1 to 0.0.0.0 in my.cnf
Then I restarted the mysql using /etc/init.d/mysql restart
Used netstat -tupln | grep 3306 for checking the statuts
service mysql status also for checking the statuts
ping dbmc-mysql-node
telnet dbmc-mysql-node 3306
Then gave privilages to all servers
GRANT ALL ON *.* to root@'%' IDENTIFIED BY 'password';
GRANT ALL ON *.* to root@'172.18.0.2' IDENTIFIED BY 'password';
FLUSH PRIVILAGES