readme
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# esadhar.fr Docker Environement
|
# clameurs-lawebserie.fr Docker Environement
|
||||||
esadhar.fr powered by druapl 7 in docker environement (nginx, php:7-fpm+drush, phpmyadmin, redis)
|
clameurs-lawebserie.fr powered by druapl 7 in docker environement (nginx, php:7-fpm+drush, phpmyadmin, redis)
|
||||||
|
|
||||||
## Install docker
|
## Install docker
|
||||||
```sh
|
```sh
|
||||||
@@ -9,37 +9,37 @@ sudo pacman -S docker docker-compose docker-machine
|
|||||||
|
|
||||||
## Clone this repos
|
## Clone this repos
|
||||||
|
|
||||||
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 clameurs drupal 7 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-clameurs
|
||||||
```
|
```
|
||||||
|
|
||||||
### 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/clameurs.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.d7.clameurs.fr
|
||||||
127.0.0.1 dev.phpmyadmin.d7.esadhar.fr
|
127.0.0.1 dev.phpmyadmin.d7.clameurs.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.clameurs.fr to our container
|
||||||
```apache
|
```apache
|
||||||
<Virtualhost *:80>
|
<Virtualhost *:80>
|
||||||
ServerName dev.esadhar.fr
|
ServerName dev.clameur.fr
|
||||||
ProxyPass / http://127.0.0.1:8880/
|
ProxyPass / http://127.0.0.1:8880/
|
||||||
ProxyPassReverse / http://127.0.0.1:8880/
|
ProxyPassReverse / http://127.0.0.1:8880/
|
||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
@@ -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.clameurs.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.clameurs.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.clameurs.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.clameurs.fr on your browser
|
||||||
|
|
||||||
## Coding
|
## Coding
|
||||||
### drush
|
### drush
|
||||||
@@ -122,14 +122,14 @@ 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/
|
||||||
- public_html/sites/all/themes/custom/materio/
|
- public_html/sites/all/themes/custom/materio/
|
||||||
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:
|
||||||
```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,19 @@ down:
|
|||||||
docker-compose down
|
docker-compose down
|
||||||
|
|
||||||
exec_phpd7:
|
exec_phpd7:
|
||||||
docker exec -it esadharfr_phpd7_1 bash
|
docker exec -it clameurs-phpd7-1 bash
|
||||||
|
|
||||||
exec_mysqld7:
|
exec_mysqld7:
|
||||||
docker exec -it esadharfr_mysqld7_1 bash
|
docker exec -it clameurs-mysqld7-1 bash
|
||||||
|
|
||||||
|
exec_nginx:
|
||||||
|
docker exec -it clameurs-nginx-1 bash
|
||||||
|
exec_npm:
|
||||||
|
docker exec -it clameurs-npm-1 sh
|
||||||
|
|
||||||
|
dump_d7_db:
|
||||||
|
docker exec clameurs-mysqld7-1 sh -c 'exec mysqldump -uroot -pperfart perfart' > ./ressources/perfart_d7-$(DATE_NOW)-local.sql
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user