base env is running well, remains to connect drupal to redis cache.backend

This commit is contained in:
Bachir Soussi Chiadmi
2018-01-21 20:38:30 +01:00
parent dce9f3958d
commit 1207d92b08
6 changed files with 38 additions and 10 deletions
+2 -1
View File
@@ -3,7 +3,8 @@ COMPOSE_PROJECT_NAME=edlpd8
PROJECT_ROOT=./public_html
LOG_ROOT=./log
DB_IMPORTE_FILE=./ressources/db.sql
DB_IMPORTE_FILE_D8=./ressources/edlp_d8.sql
DB_IMPORTE_FILE_D6=./ressources/edlp_d6.sql
DB_ROOT_PASSWORD=edlp
DB_NAME=edlp_d8
DB_USERNAME=edlp
+3
View File
@@ -0,0 +1,3 @@
public_html/*
log/*
*.sql
+7 -3
View File
@@ -1,4 +1,4 @@
FROM php:7-fpm
FROM php:7.0-fpm
COPY ./php-custom.ini /usr/local/etc/php/conf.d/php-custom.ini
@@ -7,14 +7,18 @@ RUN apt-get update && apt-get install -y \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
mysql-client \
zip && \
docker-php-ext-install -j$(nproc) iconv mcrypt && \
docker-php-ext-install -j$(nproc) mcrypt iconv && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install -j$(nproc) gd && \
docker-php-ext-install pdo_mysql zip && \
apt-get install -y git vim && \
pecl install redis-3.1.0 && \
pecl install xdebug-2.5.0 && \
docker-php-ext-enable redis xdebug && \
export COMPOSER_HOME=/usr/local/composer && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
composer global require drush/drush:6.5.0 && \
composer global require drush/drush:8 && \
composer global install && \
ln -s /usr/local/composer/vendor/drush/drush/drush /usr/local/bin/drush
+12 -4
View File
@@ -23,7 +23,7 @@ git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-edlp-
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
Copy your-sql-dump.sql into ./ressources/edlp_d8.sql
It will be automaticly imported into the mysql container db (only) on the first docker-compose up
## Hosts and reverse proxy
@@ -64,9 +64,15 @@ 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.
## Druapal Composer install
Only at first up, finish to install drupal composer dependencies
```
sudo docker exec -it edlpd8_php_1 bash
composer install
```
## Visualize
You can now visit http://dev.encyclopediedelaparole.org on your browser
After the first run
## Coding
### drush
@@ -80,7 +86,7 @@ once inside the php container in /var/www/html you can use drush as usual
Dev process needs gulp to run in:
- public_html/sites/all/modules/figli/edlp_corpus/
- public_html/sites/all/themes/custom/edlptheme/
if you have to modifie js or scss source code, you need to do in each of these 2 folder:
if you have to modifie js or scss source code, you need to do in each of these 2 folder:
```
npm install
gulp
@@ -105,4 +111,6 @@ http://tech.osteel.me/posts/2017/01/15/how-to-use-docker-for-local-web-developme
https://mmenozzi.github.io/2016/01/22/php-web-development-with-docker/
https://dzone.com/articles/continuous-drupal-maintaining-a-drupal-website-wit
https://dzone.com/articles/continuous-drupal-maintaining-a-drupal-website-wit//
https://github.com/glaux/drupal8docker
+13 -1
View File
@@ -5,15 +5,24 @@ services:
image: mariadb:latest
volumes:
- db-data:/var/lib/mysql
- "${DB_IMPORTE_FILE}:/docker-entrypoint-initdb.d/db.sql"
- "${DB_IMPORTE_FILE_D8}:/docker-entrypoint-initdb.d/edlp_d8.sql"
# - "${DB_IMPORTE_FILE_D6}:/docker-entrypoint-initdb.d/edlp_d6.sql"
networks:
- database
hostname: mysql
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
redis:
image: redis:4
networks:
- redis
ports:
- "6379"
php:
build: ./Docker/php/
expose:
@@ -22,9 +31,11 @@ services:
- "${PROJECT_ROOT}:/var/www/html"
networks:
- database
- redis
- server
depends_on:
- mysql
- redis
phpmyadmin:
image: phpmyadmin/phpmyadmin
@@ -55,4 +66,5 @@ volumes:
networks:
database:
redis:
server: