| 
					
				 | 
			
			
				@@ -8,25 +8,32 @@ sudo pacman -S docker docker-compose docker-machine 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # clone this repos 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-git clone -o figli https://figureslibres.io/gogs/bachir/docker-materio.git 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# clone drupal 7 materio base 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+this will clone this repos (main docker environement) and the materio-base drupal 7 source code (without sites/default folder) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-cd docker-materio 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-git clone -o figli https://figureslibres.io/gogs/bachir/materio-base-d7.git base_d7 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-materio.git 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-or with submodule 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-## get the sites/default contents 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ## setup /sites/default/settings.php 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+```cp -r ressources/default public_html/sites/``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## get the sites/default/files folder 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+get the files from where you have it and rsync it to public_html/sites/default/files/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 # Mysql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-copy your-sql-dump.sql into ./ressources/materio_base_d7.sql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-it will be automaticly imported into the mysql container db (only the first time) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+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 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# reverse proxy 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+add to your /etc/hosts : 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+127.0.0.1	dev.materio.com 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+127.0.0.1	dev.phpmyadmin.materio.com 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+configure your apache vhosts to add a reverse proxy that will redirect the dev.materio.com to our container 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <Virtualhost *:80> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    ServerName dev.materio.com 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -43,25 +50,40 @@ it will be automaticly imported into the mysql container db (only the first time 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    ProxyRequests Off 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </Virtualhost> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#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 run -d 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+sudo docker-compose up -d 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# Visualize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+you can now visit http://dev.materio.com on your browser 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# drush 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-log into php container 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# Coding 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## drush 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+you can access to drush by loging into the php container 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo docker exec -it materio_php_1 bash 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 once inside the php container in /var/www/html you can use drush as usual 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-# updateding manualy mysql db 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## gulp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+Dev process needs gulp to run in:  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+- public_html/sites/all/modules/gui/materiobasemod/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+- public_html/sites/all/themes/gui/materiobasetheme/  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+if you have to modifie js or scss source code, you need to do in each of these 2 folder: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+npm install 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+gulp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+## updateding manualy mysql db 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 copy your db backup into the mysql container 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 ``` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 sudo docker cp your-db-file.sql materio_mysql_1:/root/ 
			 |