drupal mathallo is running

This commit is contained in:
2025-10-30 11:02:14 +01:00
parent ee1686340b
commit b453047cc1
9 changed files with 138 additions and 62 deletions

View File

@@ -1,6 +1,6 @@
# epau Docker
epau powered by druapl 10 in docker environement (nginx, php:8.3-fpm+drush, mariadb, redis, phpmyadmin, x-debug)
# mathallo Docker
mathallo powered by druapl 10 in docker environement (nginx, php:8.3-fpm+drush, mariadb, redis, phpmyadmin, x-debug)
## Install docker
```
@@ -17,19 +17,19 @@ https://wiki.archlinux.org/index.php/Docker#Installation
## Clone this repos
this will clone this repos (main docker environement) and the epau.arch.fr drupal 9 source code (without sites/default folder nor mysq ddbs)
this will clone this repos (main docker environement) and the mathallo.arch.fr drupal 9 source code (without sites/default folder nor mysq ddbs)
```
git clone --recursive -o figli https://figureslibres.io/gitea/bachir/docker-epau.git
git clone --recursive -o figli https://figureslibres.io/gitea/bachir/docker-mathallo.git
```
submodules :
- https://figureslibres.io/gitea/bachir/drupal-epau
- https://figureslibres.io/gitea/bachir/drupal-mathallo
## touch log file
```
touch log/nginx/error.log
touch log/nginx/epau/error.log
touch log/nginx/mathallo/error.log
```
### setup /sites/default/settings.php
@@ -45,31 +45,31 @@ cp -r ressources/drupal/services.yml src/web/sites/default/
rsync the files from you know where (if you don't, you don't) to src/sites/default/files/
## Mysql
Copy your-sql-dump.sql files into ```./ressources/epau.sql```
Copy your-sql-dump.sql files into ```./ressources/mathallo.sql```
They will be automaticly imported into the mysql containers dbs (only) on the first docker-compose up
## Hosts and reverse proxy
add to your /etc/hosts :
```
127.0.0.1 dev.epau.fr
127.0.0.1 dev.phpmyadmin.epau.fr
127.0.0.1 dev.mathallo.fr
127.0.0.1 dev.phpmyadmin.mathallo.fr
```
configure your vhosts to add a reverse proxy that will redirect the dev.materio.com to our container
### nginx
```sh
sudo mkdir /etc/var/log/epau
sudo mkdir /etc/var/log/mathallo
```
```nginx
server {
listen 80;
server_name dev.epau.fr;
server_name dev.mathallo.fr;
access_log off;
error_log /var/log/nginx/epau/error.log error;
error_log /var/log/nginx/mathallo/error.log error;
client_max_body_size 100m;
@@ -86,7 +86,7 @@ server {
}
server {
listen 80;
server_name dev.phpmyadmin.epau.fr;
server_name dev.phpmyadmin.mathallo.fr;
location / {
proxy_pass http://127.0.0.1:8981;
@@ -104,7 +104,7 @@ server {
### apache
```apache
<Virtualhost *:80>
ServerName dev.epau.fr
ServerName dev.mathallo.fr
ProxyPass / http://127.0.0.1:8980/
ProxyPassReverse / http://127.0.0.1:8980/
ProxyRequests Off
@@ -114,7 +114,7 @@ server {
proxy_busy_buffers_size 256k;
</Virtualhost>
<Virtualhost *:80>
ServerName dev.phpmyadmin.epau.fr
ServerName dev.phpmyadmin.mathallo.fr
ProxyPass / http://127.0.0.1:8981/
ProxyPassReverse / http://127.0.0.1:8981/
ProxyRequests Off
@@ -165,7 +165,7 @@ make composer_install
```
## Visualize
You can now visit http://dev.epau.fr on your browser
You can now visit http://dev.mathallo.fr on your browser
After the first run
## Coding
@@ -190,7 +190,7 @@ make maj_config
## Updating manualy the mysql db
copy your db backup into the mysql container
```sh
docker cp your-db-file.sql epau-mysql-1:/root/
docker cp your-db-file.sql mathallo-mysql-1:/root/
```
log into mysql container
```sh
@@ -198,11 +198,11 @@ make exec_mysql
```
once inside the mysql container you can use mysql command to drop then create and load the db with your file
```
mysql -uroot -pepau
> drop database epau;
> create database epau;
mysql -uroot -pmathallo
> drop database mathallo;
> create database mathallo;
> exit;
mysql -uroot -pepau epau < your-db-file-name.sql
mysql -uroot -pmathallo mathallo < your-db-file-name.sql
```
@@ -250,28 +250,28 @@ ps:
logs:
docker-compose logs -f
maj_config: crd composer_install updb cim cr pag #dev.phpmyadmin.epau.fr
maj_config: crd composer_install updb cim cr pag #dev.phpmyadmin.mathallo.fr
crd:
docker exec epau-php-1 /bin/bash -c "drush cache-clear drush"
docker exec mathallo-php-1 /bin/bash -c "drush cache-clear drush"
composer_install:
docker exec epau-php-1 /bin/bash -c "composer install --no-dev"
docker exec mathallo-php-1 /bin/bash -c "composer install --no-dev"
updb:
docker exec epau-php-1 /bin/bash -c "drush updb -y"
docker exec mathallo-php-1 /bin/bash -c "drush updb -y"
cim:
docker exec epau-php-1 /bin/bash -c "drush config-import -y"
docker exec mathallo-php-1 /bin/bash -c "drush config-import -y"
# sync_struct:
# docker exec epau-php-1 /bin/bash -c "drush im --choice safe && drush ib --choice full"
# docker exec mathallo-php-1 /bin/bash -c "drush im --choice safe && drush ib --choice full"
cr:
docker exec epau-php-1 /bin/bash -c "drush cr"
docker exec mathallo-php-1 /bin/bash -c "drush cr"
pag:
docker exec epau-php-1 /bin/bash -c "drush pag all canonical_entities:node && drush pag all canonical_entities:taxonomy_term"
docker exec mathallo-php-1 /bin/bash -c "drush pag all canonical_entities:node && drush pag all canonical_entities:taxonomy_term"
restart_nginx:
docker-compose restart nginx
@@ -283,16 +283,16 @@ down:
docker-compose down
exec_nginx:
docker exec -it epau-nginx-1 bash
docker exec -it mathallo-nginx-1 bash
exec_php:
docker exec -it epau-php-1 bash
docker exec -it mathallo-php-1 bash
exec_mysql:
docker exec -it epau-mysql-1 bash
docker exec -it mathallo-mysql-1 bash
dump_db:
docker exec epau-mysql-1 sh -c 'exec mysqldump -uroot -pepau epau' > ./ressources/epau-$(DATE_NOW)-local.sql
docker exec mathallo-mysql-1 sh -c 'exec mysqldump -uroot -pmathallo mathallo' > ./ressources/mathallo-$(DATE_NOW)-local.sql
```