|
5 days ago | |
---|---|---|
Docker | 1 month ago | |
api @ f0966cea3f | 1 month ago | |
app @ 40bf13de53 | 5 days ago | |
bin | 1 month ago | |
.env | 1 month ago | |
.gitignore | 1 month ago | |
.gitmodules | 1 month ago | |
LICENSE.txt | 1 month ago | |
Makefile | 1 month ago | |
README.md | 1 month ago | |
docker-compose.yml | 5 days ago |
En FrançaiS powered by druapl 8 for the api and vuejs for the client in docker environement (nginx, php:7-fpm+drush, phpmyadmin, redis, npm)
sudo pacman -S docker docker-compose docker-machine
this will clone this repos (main docker environement) and the edlp drupal 8 source code (without sites/default folder)
git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-materio-d8.git
cp -r ressources/default api/web/sites/
get the files from where you have it and rsync it to api/web/sites/default/files/
Copy your-sql-dump.sql into ./ressources/enfrancais.sql It will be automaticly imported into the mysql container db (only) on the first docker-compose up
add to your /etc/hosts :
127.0.0.1 dev.enfrancais.fr
127.0.0.1 dev.phpmyadmin.enfrancais.fr
configure your vhosts to add a reverse proxy that will redirect the dev.enfrancais.fr to our container Apache
<Virtualhost *:80>
ServerName dev.enfrancais.fr
ProxyPass / http://127.0.0.1:8990/
ProxyPassReverse / http://127.0.0.1:8990/
ProxyRequests Off
ProxyPreserveHost On
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
</Virtualhost>
<Virtualhost *:80>
ServerName dev.phpmyadmin.enfrancais.fr
ProxyPass / http://127.0.0.1:8991/
ProxyPassReverse / http://127.0.0.1:8991/
ProxyRequests Off
ProxyPreserveHost On
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
</Virtualhost>
nginx
server {
listen 80;
server_name dev.enfrancais.fr;
access_log off;
error_log /var/log/nginx/enfrancais/error.log error;
client_max_body_size 100m;
location / {
proxy_pass http://127.0.0.1:8990;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
}
server {
listen 80;
server_name dev.phpmyadmin.enfrancais.com;
location / {
proxy_pass http://127.0.0.1:8991;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
}
pull the latest image of services
make pull
only before the first run (may take some time)
make build
then each time you want to launch the app
make up
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.
Only at first up, finish to install drupal composer dependencies
make exec_php
composer install
You can now visit http://dev.enfrancais.fr on your browser
you can access to drush by loging into the php container
make exec_php
once inside the php container in /var/www/html you can use drush as usual
copy your db backup into the mysql container
sudo docker cp your-db-file.sql enfrancais_mysql_1:/root/
log into mysql container
make exec_mysql
once inside the mysql container you can use mysql command to drop then create and load the db with your file
do not use directly docker or docker-compose to run this instance
use make instead like make up
pull:
docker-compose pull
build:
docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
buildnc:
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
up:
docker-compose up -d
upbuild:
docker-compose up -d --build
ps:
docker-compose ps
logs:
docker-compose logs -f
down:
docker-compose down
exec_php:
docker exec -it materiod8_php_1 bash
exec_npm:
docker exec -it materiod8_npm_1 sh
exec_mysql:
docker exec -it materiod8_mysql_1 bash