created multisite
This commit is contained in:
@@ -3,8 +3,10 @@ COMPOSE_PROJECT_NAME=popsucoloque
|
|||||||
PROJECT_ROOT=./app
|
PROJECT_ROOT=./app
|
||||||
LOG_ROOT=./log
|
LOG_ROOT=./log
|
||||||
|
|
||||||
DB_IMPORTE_FILE_D8=./ressources/colloque21.sql
|
DB1_IMPORTE_FILE=./ressources/colloque21.sql
|
||||||
|
DB2_IMPORTE_FILE=./ressources/colloque24.sql
|
||||||
DB_ROOT_PASSWORD=popsu
|
DB_ROOT_PASSWORD=popsu
|
||||||
DB_NAME=colloque21
|
DB1_NAME=colloque21
|
||||||
|
DB2_NAME=colloque24
|
||||||
DB_USERNAME=popsu
|
DB_USERNAME=popsu
|
||||||
DB_PASSWORD=popsu
|
DB_PASSWORD=popsu
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ server {
|
|||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
root /var/www/html/popsucoloque.com/public_html/web;
|
root /var/www/html/popsucoloque.com/public_html/web;
|
||||||
index index.html index.php;
|
index index.html index.php;
|
||||||
server_name *.popsucoloque.com;
|
server_name dev.colloque2021.popsu.archi.fr dev.colloque2024.popsu.archi.fr;
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
PS1='\e[36m\e[1mPHP-7.3\e[0m:\e[90m\w\e[0m\n$ '
|
PS1='\e[36m\e[1mPHP-8.1\e[0m:\e[90m\w\e[0m\n$ '
|
||||||
bind '"\e[A": history-search-backward'
|
bind '"\e[A": history-search-backward'
|
||||||
bind '"\e[B": history-search-forward'
|
bind '"\e[B": history-search-forward'
|
||||||
|
|||||||
@@ -36,11 +36,18 @@ down:
|
|||||||
exec_php:
|
exec_php:
|
||||||
docker exec -it popsucoloque-php-1 bash
|
docker exec -it popsucoloque-php-1 bash
|
||||||
|
|
||||||
exec_npm:
|
exec_nginx:
|
||||||
docker exec -it popsucoloque-npm-1 sh
|
docker exec -it popsucoloque-nginx-1 bash
|
||||||
|
|
||||||
exec_mysql:
|
exec_mysql:
|
||||||
docker exec -it popsucoloque-mysql-1 bash
|
docker exec -it popsucoloque-mysql-1 bash
|
||||||
|
|
||||||
|
restart_php:
|
||||||
|
docker-compose restart php
|
||||||
|
|
||||||
|
restart_nginx:
|
||||||
|
docker-compose restart nginx
|
||||||
|
|
||||||
dump_db:
|
dump_db:
|
||||||
docker exec popsucoloque-mysql-1 sh -c 'exec mysqldump -uroot -ppopsu colloque21' > ./ressources/colloque21-$(DATE_NOW)-local.sql
|
docker exec popsucoloque-mysql-1 sh -c 'exec mysqldump -uroot -ppopsu colloque21' > ./ressources/colloque21-$(DATE_NOW)-local.sql
|
||||||
|
docker exec popsucoloque-mysql-1 sh -c 'exec mysqldump -uroot -ppopsu colloque24' > ./ressources/colloque24-$(DATE_NOW)-local.sql
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ 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)
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-popsu-coloque-d8.git
|
git clone --recursive -o gogs https://figureslibres.io/gogs/bachir/docker-popsu-coloques.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### setup /sites/default/settings.php
|
### setup /sites/default/settings.php
|
||||||
@@ -23,40 +23,50 @@ git clone --recursive -o figli https://figureslibres.io/gogs/bachir/docker-popsu
|
|||||||
get the files from where you have it and rsync it to public_html/sites/default/files/
|
get the files from where you have it and rsync it to public_html/sites/default/files/
|
||||||
|
|
||||||
## Mysql
|
## Mysql
|
||||||
Copy your-sql-dump.sql into ./ressources/popsucolloque_d8.sql
|
Copy your-sql-dump.sql into ./ressources/popsucolloque21.sql & ./ressources/popsucolloque24.sql
|
||||||
It will be automaticly imported into the mysql container db (only) on the first docker-compose up
|
It will be automaticly imported into the mysql container db (only) on the first docker-compose up
|
||||||
|
|
||||||
## Hosts and reverse proxy
|
## Hosts and reverse proxy
|
||||||
|
|
||||||
add to your /etc/hosts :
|
add to your /etc/hosts :
|
||||||
```
|
```
|
||||||
127.0.0.1 dev.popsu-coloque.com
|
127.0.0.1 dev.colloque2021.popsu.archi.fr
|
||||||
127.0.0.1 dev.phpmyadmin.popsu-coloque.com
|
127.0.0.1 dev.colloque2024.popsu.archi.fr
|
||||||
|
127.0.0.1 dev.phpmyadmin.popsucolloques.fr
|
||||||
```
|
```
|
||||||
configure your apache vhosts to add a reverse proxy that will redirect the dev.popsu-coloque.com to our container
|
configure your nginx vhosts to add a reverse proxy that will redirect the dev.popsucolloque21.fr and dev.popsucolloque24.fr to our container
|
||||||
```
|
```nginx
|
||||||
<Virtualhost *:80>
|
server {
|
||||||
ServerName dev.popsu-coloque.com
|
listen 80;
|
||||||
ProxyPass / http://127.0.0.1:8880/
|
server_name dev.colloque2021.popsu.archi.fr dev.colloque2024.popsu.archi.fr;
|
||||||
ProxyPassReverse / http://127.0.0.1:8880/
|
|
||||||
ProxyRequests Off
|
location / {
|
||||||
ProxyPreserveHost On
|
proxy_pass http://127.0.0.1:8890;
|
||||||
proxy_buffer_size 128k;
|
proxy_set_header Host $host;
|
||||||
proxy_buffers 4 256k;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_busy_buffers_size 256k;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
</Virtualhost>
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
```
|
proxy_buffer_size 128k;
|
||||||
```
|
proxy_buffers 4 256k;
|
||||||
<Virtualhost *:80>
|
proxy_busy_buffers_size 256k;
|
||||||
ServerName dev.phpmyadmin.popsu-coloque.com
|
}
|
||||||
ProxyPass / http://127.0.0.1:8881/
|
}
|
||||||
ProxyPassReverse / http://127.0.0.1:8881/
|
|
||||||
ProxyRequests Off
|
server {
|
||||||
ProxyPreserveHost On
|
listen 80;
|
||||||
proxy_buffer_size 128k;
|
server_name dev.phpmyadmin.popsucolloques.fr;
|
||||||
proxy_buffers 4 256k;
|
|
||||||
proxy_busy_buffers_size 256k;
|
location / {
|
||||||
</Virtualhost>
|
proxy_pass http://127.0.0.1:8891;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
|
|||||||
+1
-1
Submodule app updated: a2659c0754...96da96e96d
+6
-4
@@ -7,15 +7,17 @@ services:
|
|||||||
- db-data:/var/lib/mysql
|
- db-data:/var/lib/mysql
|
||||||
- ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro
|
- ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro
|
||||||
- ./Docker/mysql/bashrc:/root/.bashrc:ro
|
- ./Docker/mysql/bashrc:/root/.bashrc:ro
|
||||||
- "${DB_IMPORTE_FILE_D8}:/docker-entrypoint-initdb.d/colloque21.sql"
|
- ./Docker/mysql/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
|
||||||
|
- "${DB1_IMPORTE_FILE}:/docker-entrypoint-initdb.d/colloque21.sql"
|
||||||
|
- "${DB2_IMPORTE_FILE}:/docker-entrypoint-initdb.d/colloque24.sql"
|
||||||
networks:
|
networks:
|
||||||
- database
|
- database
|
||||||
hostname: mysql
|
hostname: mysql
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
|
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
|
||||||
MYSQL_DATABASE: "${DB_NAME}"
|
# MYSQL_DATABASE: "${DB1_NAME}"
|
||||||
MYSQL_USER: "${DB_USERNAME}"
|
# MYSQL_USER: "${DB_USERNAME}"
|
||||||
MYSQL_PASSWORD: "${DB_PASSWORD}"
|
# MYSQL_PASSWORD: "${DB_PASSWORD}"
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:4
|
image: redis:4
|
||||||
|
|||||||
Reference in New Issue
Block a user