| 
					
				 | 
			
			
				@@ -2,12 +2,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # MateriO 7.x 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 MateriO Base powered by druapl 7  in docker environement (nginx, php:5.6-fpm+drush, solr:5, phpmyadmin) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# install docker 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## Install docker 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo pacman -S docker docker-compose docker-machine 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# clone this repos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## Clone this repos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 this will clone this repos (main docker environement) and the materio-base drupal 7 source code (without sites/default folder) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -15,18 +15,18 @@ this will clone this repos (main docker environement) and the materio-base drupa 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-materio.git 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-## setup /sites/default/settings.php 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### setup /sites/default/settings.php 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ```cp -r ressources/default public_html/sites/``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-## get the sites/default/files folder 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### get the sites/default/files folder 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 get the files from where you have it and rsync it to public_html/sites/default/files/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# Mysql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## Mysql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 Copy your-sql-dump.sql into ./ressources/db.sql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 It will be automaticly imported into the mysql container db (only) on the first docker-compose up 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# hosts and reverse proxy 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## Hosts and reverse proxy 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 add to your /etc/hosts : 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -37,43 +37,56 @@ configure your apache vhosts to add a reverse proxy that will redirect the dev.m 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <Virtualhost *:80> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    ServerName dev.materio.com 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   ProxyPass / http://127.0.0.1:81/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   ProxyPassReverse / http://127.0.0.1:81/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   ProxyPass / http://127.0.0.1:8880/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   ProxyPassReverse / http://127.0.0.1:8880/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    ProxyRequests Off 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </Virtualhost> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <Virtualhost *:80> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    ServerName dev.phpmyadmin.materio.com 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   ProxyPass / http://127.0.0.1:8080/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   ProxyPassReverse / http://127.0.0.1:8080/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   ProxyPass / http://127.0.0.1:8881/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   ProxyPassReverse / http://127.0.0.1:8881/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    ProxyRequests Off 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </Virtualhost> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-#Docker 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## Docker 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-## build 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### build 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 only before the first run (may take some time) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo docker-compose build 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-## run 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### run 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 then each time you want to launch the app 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo docker-compose up -d 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# Visualize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-you can now visit http://dev.materio.com on your browser 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+Be aware that a first up, since the db is empty, it will be populated with your file db.sql. It may take some time depending of your db size. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# Coding 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-## drush 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### solr 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+At first run solr index will be empty, you should login into materio_php_1 and index all the content. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+sudo docker exec -it materiod7_php_1 bash 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+once inside materio_php_1 run 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+drush sapi-i 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## Visualize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+You can now visit http://dev.materio.com on your browser 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+After the first run 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## Coding 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### drush 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 you can access to drush by loging into the php container 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-sudo docker exec -it materio_php_1 bash 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+sudo docker exec -it materiod7_php_1 bash 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 once inside the php container in /var/www/html you can use drush as usual 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-## gulp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+### gulp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 Dev process needs gulp to run in:  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 - public_html/sites/all/modules/gui/materiobasemod/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 - public_html/sites/all/themes/gui/materiobasetheme/  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -86,11 +99,11 @@ gulp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ## updateding manualy mysql db 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 copy your db backup into the mysql container 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-sudo docker cp your-db-file.sql materio_mysql_1:/root/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+sudo docker cp your-db-file.sql materiod7_mysql_1:/root/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 log into mysql container 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-sudo docker exec -it materio_php_1 bash 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+sudo docker exec -it materiod7_php_1 bash 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 once inside the mysql container you can use mysql command to drop then create and load the db with your file 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |