avatar
Untitled

Guest 138 23rd Nov, 2019

JAVASCRIPT 5.60 KB
                                           
                         1.) Installed Docker and created a new docker-machine

MacBook-Pro-2:~ paras$ docker-machine create rfxcel-machine
Running pre-create checks...
Creating machine...
(rfxcel-machine) Copying /Users/paras/.docker/machine/cache/boot2docker.iso to /Users/paras/.docker/machine/machines/rfxcel-machine/boot2docker.iso...
(rfxcel-machine) Creating VirtualBox VM...
(rfxcel-machine) Creating SSH key...
(rfxcel-machine) Starting the VM...
(rfxcel-machine) Check network to re-create if needed...
(rfxcel-machine) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env rfxcel-machine
MacBook-Pro-2:~ paras$ 


MacBook-Pro-2:~ paras$ docker-machine ls
NAME             ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER     ERRORS
rfxcel-machine   -        virtualbox   Running   tcp://192.168.99.101:2376           v19.03.5   
MacBook-Pro-2:~ paras$ 



2.) Connected to the new machine by running:
eval "$(docker-machine env rfxcel-machine)"

3.) navigated to the working directory

4.) ran the following command 

MacBook-Pro-2:rfxcel-web-wp paras$ git clone https://[email protected]/rfxceldev/rfxcel-web-setup.git rfxcel
Cloning into 'rfxcel'...
remote: Counting objects: 73, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 73 (delta 8), reused 0 (delta 0)
Unpacking objects: 100% (73/73), done.

5.) cd'd to rfxcel

6.) ran the following command 

docker-compose up

waited till all 11 steps were completed and docker-image was built. Console kept on logging SQL notes and warnings after that.

some logs:

db_1          | 2019-11-22 23:12:13+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1          | 2019-11-22 23:12:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.28-1debian9 started.
db_1          | 2019-11-22 23:12:13+00:00 [Note] [Entrypoint]: Initializing database files
db_1          | mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied)
db_1          | 2019-11-22T23:12:13.569807Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db_1          | 2019-11-22T23:12:13.575159Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
db_1          | 2019-11-22T23:12:13.578278Z 0 [ERROR] Aborting



7.) Deleted src/wp-content folder 

8.) Opened another window for terminal

9.) navigated to src/wp-content in the command line

10.) Ran the following command: 
MacBook-Pro-2:wp-content paras$ git clone https://[email protected]/rfxceldev/rfxcel-web.git
Cloning into 'rfxcel-web'...
remote: Counting objects: 10574, done.
remote: Compressing objects: 100% (3319/3319), done.
remote: Total 10574 (delta 1749), reused 0 (delta 0)
Receiving objects: 100% (10574/10574), 53.52 MiB | 11.79 MiB/s, done.
Resolving deltas: 100% (3376/3376), done.
Checking out files: 100% (6118/6118), done.

11.) Ran git fetch && git checkout dev but got an error

MacBook-Pro-2:wp-content paras$ git fetch && git checkout dev
error: pathspec 'dev' did not match any file(s) known to git
MacBook-Pro-2:wp-content paras$ 


12.) Opened Movefile and changed the database host to: 127.0.0.1: https://i.imgur.com/AOEvFze.png

13.) Navigatied to rfxcel2017/foundation

14.) Ran bower install successfuly 

15.) Ran npm install successfuly with some warnings

16.) connected again with the docker machine's environment to access containers and ran docker exec -i -t rfxcel_wordpress_1 bash and entered var/www/html

17.) ran wordmove pull -e staging -d but got an error 

Got error: 2003: Can't connect to MySQL server on '127.0.0.1' (111) when trying to connect

18.) Changed IP in Movefile to the ip address returned from docker-machine ip (docker inspect rfxcel_db_1 was resulting an object with an empty ip):
[email protected]:/var/www/html# MacBook-Pro-2:foundation paras$ docker-machine ip rfxcel-machine
192.168.99.101

19.) ran docker exec -i -t rfxcel_wordpress_1 bash again and entered var/www/html

20.) Returned same error

21.) docker ps returns this: 

MacBook-Pro-2:foundation paras$ docker ps 
CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS                          PORTS                                      NAMES
7d23a7186222        phpmyadmin/phpmyadmin   "/docker-entrypoint.…"   18 minutes ago      Up 18 minutes                   0.0.0.0:8080->80/tcp                       rfxcel_phpmyadmin_1
4d427dcca27c        rfxcel_wordpress        "docker-entrypoint.s…"   18 minutes ago      Up 7 seconds                    0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   rfxcel_wordpress_1
0d12335dc6e5        mysql:5.7               "docker-entrypoint.s…"   18 minutes ago      Restarting (1) 25 seconds ago                                              rfxcel_db_1
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data