readme
This commit is contained in:
@@ -55,15 +55,15 @@ down:
|
||||
docker-compose down
|
||||
|
||||
exec_phpd7:
|
||||
docker exec -it perfart-phpd7-1 bash
|
||||
docker exec -it jeunesetengages-phpd7-1 bash
|
||||
|
||||
exec_mysqld7:
|
||||
docker exec -it perfart-mysqld7-1 bash
|
||||
docker exec -it jeunesetengages-mysqld7-1 bash
|
||||
|
||||
exec_nginx:
|
||||
docker exec -it perfart-nginx-1 bash
|
||||
docker exec -it jeunesetengages-nginx-1 bash
|
||||
exec_npm:
|
||||
docker exec -it perfart-npm-1 sh
|
||||
docker exec -it jeunesetengages-npm-1 sh
|
||||
|
||||
dump_d7_db:
|
||||
docker exec perfart-mysqld7-1 sh -c 'exec mysqldump -uroot -pperfart perfart' > ./ressources/perfart_d7-$(DATE_NOW)-local.sql
|
||||
docker exec jeunesetengages-mysqld7-1 sh -c 'exec mysqldump -uroot -pjeunesetengages jeunesetengages' > ./ressources/jeunesetengages_d7-$(DATE_NOW)-local.sql
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
# esadhar.fr Docker Environement
|
||||
esadhar.fr powered by druapl 7 in docker environement (nginx, php:7-fpm+drush, phpmyadmin, redis)
|
||||
# jeunesetengages.fr Docker Environement
|
||||
jeunesetengages.fr powered by druapl 7 in docker environement (nginx, php:7-fpm+drush, phpmyadmin, redis)
|
||||
|
||||
## Install docker
|
||||
```sh
|
||||
@@ -12,31 +12,31 @@ 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)
|
||||
|
||||
```sh
|
||||
git clone --recursive -o esadhar.net https://esadhar.net/gogs/bachir/docker-esadhar-fr.git
|
||||
git clone --recursive -o origin https://figureslibres.io/gogs/bachir/docker-jeunesetengages.git
|
||||
```
|
||||
|
||||
### setup /sites/default/settings.php
|
||||
|
||||
```sh
|
||||
cp -r ressources/default public_html_d7/sites/
|
||||
cp -r ressources/default d7/sites/
|
||||
```
|
||||
|
||||
### get the sites/default/files folder
|
||||
get the files from where you have it and rsync it to public_html_d7/sites/default/files/
|
||||
get the files from where you have it and rsync it to d7/sites/default/files/
|
||||
|
||||
## Mysql
|
||||
Copy your-sql-dump.sql into ./ressources/esadhar_d7.sql
|
||||
Copy your-sql-dump.sql into ./ressources/jeunesetengages.sql
|
||||
It will be automaticly imported into the mysql container db (only) on the first ```make up```
|
||||
|
||||
## Hosts and reverse proxy
|
||||
|
||||
add to your /etc/hosts :
|
||||
```
|
||||
127.0.0.1 dev.d7.esadhar.fr
|
||||
127.0.0.1 dev.phpmyadmin.d7.esadhar.fr
|
||||
127.0.0.1 dev.jeunesetengages.fr
|
||||
127.0.0.1 dev.phpmyadmin.d7.jeunesetengages.fr
|
||||
```
|
||||
### apache
|
||||
configure your apache vhosts to add a reverse proxy that will redirect the dev.d7.esadhar.fr to our container
|
||||
configure your apache vhosts to add a reverse proxy that will redirect the dev.jeunesetengages.fr to our container
|
||||
```apache
|
||||
<Virtualhost *:80>
|
||||
ServerName dev.esadhar.fr
|
||||
@@ -51,7 +51,7 @@ configure your apache vhosts to add a reverse proxy that will redirect the dev.d
|
||||
```
|
||||
```apache
|
||||
<Virtualhost *:80>
|
||||
ServerName dev.phpmyadmin.esadhar.fr
|
||||
ServerName dev.phpmyadmin.jeunesetengages.fr
|
||||
ProxyPass / http://127.0.0.1:8881/
|
||||
ProxyPassReverse / http://127.0.0.1:8881/
|
||||
ProxyRequests Off
|
||||
@@ -66,7 +66,7 @@ configure your apache vhosts to add a reverse proxy that will redirect the dev.d
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name dev.d7.esadhar.fr;
|
||||
server_name dev.jeunesetengages.fr;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8880;
|
||||
@@ -81,7 +81,7 @@ server {
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name dev.phpmyadmin.d7.esadhar.fr;
|
||||
server_name dev.phpmyadmin.jeunesetengages.fr;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8881;
|
||||
@@ -112,7 +112,7 @@ Be aware that a first up, since the db is empty, it will be populated with your
|
||||
|
||||
|
||||
## Visualize
|
||||
You can now visit http://dev.d7.esadhar.fr on your browser
|
||||
You can now visit http://dev.jeunesetengages.fr on your browser
|
||||
|
||||
## Coding
|
||||
### drush
|
||||
@@ -121,7 +121,7 @@ you can access to drush by loging into the php container
|
||||
make exec_phpd7
|
||||
```
|
||||
once inside the php container you can use drush as usual
|
||||
|
||||
<!--
|
||||
### gulp
|
||||
Dev process needs gulp to run in:
|
||||
- public_html/sites/all/modules/custom/materio/
|
||||
@@ -130,7 +130,7 @@ Dev process needs gulp to run in:
|
||||
```sh
|
||||
npm install
|
||||
gulp
|
||||
```
|
||||
``` -->
|
||||
|
||||
## Makefile
|
||||
|
||||
@@ -144,11 +144,30 @@ build:
|
||||
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)
|
||||
|
||||
buildncnginx:
|
||||
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) nginx
|
||||
|
||||
buildncnginx_static:
|
||||
docker-compose -f docker-compose-static.yml 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) nginx_static
|
||||
|
||||
up:
|
||||
docker-compose up -d
|
||||
|
||||
upbuild:
|
||||
docker-compose up -d --build
|
||||
up_static:
|
||||
docker-compose -f docker-compose-static.yml up -d
|
||||
|
||||
down_static:
|
||||
docker-compose -f docker-compose-static.yml down
|
||||
|
||||
|
||||
restart_nginx:
|
||||
docker-compose restart nginx
|
||||
|
||||
restart_nginx_static:
|
||||
docker-compose -f docker-compose-static.yml restart nginx_static
|
||||
|
||||
# upbuild:
|
||||
# docker-compose up -d --build
|
||||
|
||||
ps:
|
||||
docker-compose ps
|
||||
@@ -160,10 +179,18 @@ down:
|
||||
docker-compose down
|
||||
|
||||
exec_phpd7:
|
||||
docker exec -it esadharfr_phpd7_1 bash
|
||||
docker exec -it jeunesetengages-phpd7-1 bash
|
||||
|
||||
exec_mysqld7:
|
||||
docker exec -it esadharfr_mysqld7_1 bash
|
||||
docker exec -it jeunesetengages-mysqld7-1 bash
|
||||
|
||||
exec_nginx:
|
||||
docker exec -it jeunesetengages-nginx-1 bash
|
||||
exec_npm:
|
||||
docker exec -it jeunesetengages-npm-1 sh
|
||||
|
||||
dump_d7_db:
|
||||
docker exec jeunesetengages-mysqld7-1 sh -c 'exec mysqldump -uroot -pjeunesetengages jeunesetengages' > ./ressources/jeunesetengages_d7-$(DATE_NOW)-local.sql
|
||||
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user