No Description

Bachir Soussi Chiadmi d71f2768cc new public_html commit 2 months ago
Docker fba3e3627b first commit 10 months ago
log 20314721ed added gitkeep in log/nginx 4 months ago
public_html @ a8891db014 d71f2768cc new public_html commit 2 months ago
ressources fba3e3627b first commit 10 months ago
.env fba3e3627b first commit 10 months ago
.gitignore fba3e3627b first commit 10 months ago
.gitmodules fba3e3627b first commit 10 months ago
README.md 05cb8ef290 updated readme 10 months ago
docker-compose.yml fba3e3627b first commit 10 months ago

README.md

Popsu 7.x

Popsu powered by druapl 7 in docker environement (nginx, php:5.6-fpm+drush, mariadb, redis:4, phpmyadmin)

Install docker

sudo pacman -S docker docker-compose docker-machine

Clone this repos

this will clone this repos (main docker environement) and the materio-base drupal 7 source code (without sites/default folder)

git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-popsu-d7.git

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/db.sql It will be automaticly imported into the mysql container db (only) on the first docker-compose up

Hosts and reverse proxy

add to your /etc/hosts :

127.0.0.1	dev.popsu.archi.fr
127.0.0.1	dev.phpmyadmin.popsu.archi.fr

configure your apache vhosts to add a reverse proxy that will redirect the dev.materio.com to our container

<Virtualhost *:80>
   ServerName dev.popsu.archi.fr
   ProxyPass / http://127.0.0.1:8880/
   ProxyPassReverse / http://127.0.0.1:8880/
   ProxyRequests Off
</Virtualhost>
<Virtualhost *:80>
   ServerName dev.phpmyadmin.popsu.archi.fr
   ProxyPass / http://127.0.0.1:8881/
   ProxyPassReverse / http://127.0.0.1:8881/
   ProxyRequests Off
</Virtualhost>

Docker

build

only before the first run (may take some time)

sudo docker-compose build

run

then each time you want to launch the app

sudo docker-compose up -d

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.

loging in

sudo docker exec -it popsu_php_1 bash

Visualize

You can now visit http://dev.popsu.archi.fr on your browser After the first run

Coding

drush

you can access to drush by loging into the php container

sudo docker exec -it popsu_php_1 bash

once inside the php container in /var/www/html you can use drush as usual

updateding manualy mysql db

copy your db backup into the mysql container

sudo docker cp your-db-file.sql popsu_mysql_1:/root/

log into mysql container

sudo docker exec -it popsu_php_1 bash

once inside the mysql container you can use mysql command to drop then create and load the db with your file

sources

https://www.ostraining.com/blog/drupal/docker/

http://tech.osteel.me/posts/2017/01/15/how-to-use-docker-for-local-web-development-an-update.html

https://mmenozzi.github.io/2016/01/22/php-web-development-with-docker/

https://dzone.com/articles/continuous-drupal-maintaining-a-drupal-website-wit