This commit is contained in:
2022-04-25 10:22:13 +02:00
parent 1a2f48f1a3
commit 1e42babd80
2 changed files with 51 additions and 24 deletions
+5 -5
View File
@@ -55,15 +55,15 @@ down:
docker-compose down docker-compose down
exec_phpd7: exec_phpd7:
docker exec -it perfart-phpd7-1 bash docker exec -it jeunesetengages-phpd7-1 bash
exec_mysqld7: exec_mysqld7:
docker exec -it perfart-mysqld7-1 bash docker exec -it jeunesetengages-mysqld7-1 bash
exec_nginx: exec_nginx:
docker exec -it perfart-nginx-1 bash docker exec -it jeunesetengages-nginx-1 bash
exec_npm: exec_npm:
docker exec -it perfart-npm-1 sh docker exec -it jeunesetengages-npm-1 sh
dump_d7_db: 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
+46 -19
View File
@@ -1,6 +1,6 @@
# esadhar.fr Docker Environement # jeunesetengages.fr Docker Environement
esadhar.fr powered by druapl 7 in docker environement (nginx, php:7-fpm+drush, phpmyadmin, redis) jeunesetengages.fr powered by druapl 7 in docker environement (nginx, php:7-fpm+drush, phpmyadmin, redis)
## Install docker ## Install docker
```sh ```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) this will clone this repos (main docker environement) and the edlp drupal 8 source code (without sites/default folder)
```sh ```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 ### setup /sites/default/settings.php
```sh ```sh
cp -r ressources/default public_html_d7/sites/ cp -r ressources/default d7/sites/
``` ```
### get the sites/default/files folder ### 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 ## 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``` It will be automaticly imported into the mysql container db (only) on the first ```make up```
## Hosts and reverse proxy ## Hosts and reverse proxy
add to your /etc/hosts : add to your /etc/hosts :
``` ```
127.0.0.1 dev.d7.esadhar.fr 127.0.0.1 dev.jeunesetengages.fr
127.0.0.1 dev.phpmyadmin.d7.esadhar.fr 127.0.0.1 dev.phpmyadmin.d7.jeunesetengages.fr
``` ```
### apache ### 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 ```apache
<Virtualhost *:80> <Virtualhost *:80>
ServerName dev.esadhar.fr ServerName dev.esadhar.fr
@@ -51,7 +51,7 @@ configure your apache vhosts to add a reverse proxy that will redirect the dev.d
``` ```
```apache ```apache
<Virtualhost *:80> <Virtualhost *:80>
ServerName dev.phpmyadmin.esadhar.fr ServerName dev.phpmyadmin.jeunesetengages.fr
ProxyPass / http://127.0.0.1:8881/ ProxyPass / http://127.0.0.1:8881/
ProxyPassReverse / http://127.0.0.1:8881/ ProxyPassReverse / http://127.0.0.1:8881/
ProxyRequests Off ProxyRequests Off
@@ -66,7 +66,7 @@ configure your apache vhosts to add a reverse proxy that will redirect the dev.d
```nginx ```nginx
server { server {
listen 80; listen 80;
server_name dev.d7.esadhar.fr; server_name dev.jeunesetengages.fr;
location / { location / {
proxy_pass http://127.0.0.1:8880; proxy_pass http://127.0.0.1:8880;
@@ -81,7 +81,7 @@ server {
} }
server { server {
listen 80; listen 80;
server_name dev.phpmyadmin.d7.esadhar.fr; server_name dev.phpmyadmin.jeunesetengages.fr;
location / { location / {
proxy_pass http://127.0.0.1:8881; 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 ## 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 ## Coding
### drush ### drush
@@ -121,7 +121,7 @@ you can access to drush by loging into the php container
make exec_phpd7 make exec_phpd7
``` ```
once inside the php container you can use drush as usual once inside the php container you can use drush as usual
<!--
### gulp ### gulp
Dev process needs gulp to run in: Dev process needs gulp to run in:
- public_html/sites/all/modules/custom/materio/ - public_html/sites/all/modules/custom/materio/
@@ -130,7 +130,7 @@ Dev process needs gulp to run in:
```sh ```sh
npm install npm install
gulp gulp
``` ``` -->
## Makefile ## Makefile
@@ -144,11 +144,30 @@ build:
buildnc: 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) 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: up:
docker-compose up -d docker-compose up -d
upbuild: up_static:
docker-compose up -d --build 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: ps:
docker-compose ps docker-compose ps
@@ -160,10 +179,18 @@ down:
docker-compose down docker-compose down
exec_phpd7: exec_phpd7:
docker exec -it esadharfr_phpd7_1 bash docker exec -it jeunesetengages-phpd7-1 bash
exec_mysqld7: 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
``` ```