Compare commits

..

14 Commits

Author SHA1 Message Date
7b3108da85 ssrc_d9 new commit 2025-04-11 10:38:09 +02:00
2106517adb removed d7 containers 2025-04-11 10:04:02 +02:00
5ff1cd63d2 src_d9 new commits 2025-03-10 11:40:30 +01:00
20ea6838c7 updated gitmodules urls 2025-03-10 11:34:57 +01:00
0fb5595a07 src_d9 update 2024-02-01 10:47:41 +01:00
becdab47fd make file bug fix 2024-01-31 21:37:06 +01:00
da696eee06 updated all minors and major version of modules, perparing for drupal core upgrade to 10 2024-01-31 21:27:28 +01:00
a01a2db696 modified bashrc php version 2024-01-31 17:06:45 +01:00
2fde89b394 updated src_d9 2024-01-31 14:37:04 +01:00
2425dc7881 some cleaning 2023-10-31 16:20:43 +01:00
78ebe8af17 app update 2023-03-27 11:46:54 +02:00
a1c051983d updated php to 8.1 2023-03-27 11:10:41 +02:00
a6ff31a2a2 updated src_d9 2022-08-17 18:34:18 +02:00
5872e1d879 fixed xdebug 2022-08-17 18:34:00 +02:00
13 changed files with 132 additions and 93 deletions

4
.gitmodules vendored
View File

@@ -1,6 +1,6 @@
[submodule "src_d7"]
path = src_d7
url = https://figureslibres.io/gogs/bachir/popsu-d7.git
url = https://figureslibres.io/gitea/bachir/popsu-d7.git
[submodule "src_d9"]
path = src_d9
url = https://figureslibres.io/gogs/bachir/popsu-d9.git
url = https://figureslibres.io/gitea/bachir/popsu-d9.git

View File

@@ -1,40 +1,40 @@
server {
listen 80;
root /var/www/d7;
index index.html index.php;
server_name dev.d7.popsu.archi.fr;
# server {
# listen 80;
# root /var/www/d7;
# index index.html index.php;
# server_name dev.d7.popsu.archi.fr;
charset utf-8;
# charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# location / {
# try_files $uri $uri/ /index.php?$query_string;
# }
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
# location = /favicon.ico { access_log off; log_not_found off; }
# location = /robots.txt { access_log off; log_not_found off; }
access_log on;
error_log /var/log/nginx/error-d7.log error;
# access_log on;
# error_log /var/log/nginx/error-d7.log error;
sendfile off;
# sendfile off;
client_max_body_size 100m;
# client_max_body_size 100m;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php_d7:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
# location ~ \.php$ {
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_pass php_d7:9000;
# fastcgi_index index.php;
# include fastcgi_params;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_intercept_errors off;
# fastcgi_buffer_size 16k;
# fastcgi_buffers 4 16k;
# }
location ~ /\.ht {
deny all;
}
}
# location ~ /\.ht {
# deny all;
# }
# }
server {
listen 80;

View File

@@ -1,4 +1,4 @@
FROM php:7.4-fpm
FROM php:8.1-fpm
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
@@ -7,6 +7,8 @@ RUN apt-get update && apt-get install -y \
libpng-dev \
mariadb-client \
zip \
iputils-ping \
iproute2 \
libzip-dev && \
# docker-php-ext-install -j$(nproc) iconv && \
docker-php-ext-configure gd --with-freetype --with-jpeg && \
@@ -20,8 +22,10 @@ RUN apt-get update && apt-get install -y \
RUN apt-get install -y git vim
RUN pecl install redis-5.3.3 && \
pecl install xdebug-2.9.2 && \
docker-php-ext-enable redis xdebug
docker-php-ext-enable redis
RUN pecl install xdebug-3.3.1 && \
docker-php-ext-enable xdebug
RUN export COMPOSER_HOME=/usr/local/composer && \
curl -sS https://getcomposer.org/installer \
@@ -33,13 +37,6 @@ RUN export COMPOSER_HOME=/usr/local/composer && \
-L -o /usr/local/bin/drush && \
chmod +x /usr/local/bin/drush
RUN apt-get install -y curl && \
curl -sL https://deb.nodesource.com/setup_11.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y nodejs yarn
RUN apt-get install -y rsyslog
COPY ./rsyslog-drupal.conf /etc/rsyslog.d/drupal.conf
# ENTRYPOINT ["sh", "-c", "service rsyslog start ; tail -f /dev/null"]

View File

@@ -1,4 +1,4 @@
PS1='\e[36m\e[1mPHP-7.4\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[B": history-search-forward'

View File

@@ -24,6 +24,12 @@ 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)
buildnc_php_d9:
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) php_d9
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
downbuildup: down build up
up:
@@ -67,20 +73,20 @@ down:
exec_nginx:
docker exec -it popsu-nginx-1 bash
exec_php_d7:
docker exec -it popsu-php_d7-1 bash
# exec_php_d7:
# docker exec -it popsu-php_d7-1 bash
exec_php_d9:
docker exec -it popsu-php_d9-1 bash
exec_mysql_d7:
docker exec -it popsu-mysql_d7-1 bash
# exec_mysql_d7:
# docker exec -it popsu-mysql_d7-1 bash
exec_mysql_d9:
docker exec -it popsu-mysql_d9-1 bash
dump_d7_db:
docker exec popsu-mysql_d7-1 sh -c 'exec mysqldump -uroot -ppopsu popsu-d7' > ./ressources/popsu-d7-$(DATE_NOW)-local.sql
# dump_d7_db:
# docker exec popsu-mysql_d7-1 sh -c 'exec mariadb-dump -uroot -ppopsu popsu-d7' > ./ressources/popsu-d7-$(DATE_NOW)-local.sql
dump_d9_db:
docker exec popsu-mysql_d9-1 sh -c 'exec mysqldump -uroot -ppopsu popsu-d9' > ./ressources/popsu-d9-$(DATE_NOW)-local.sql
docker exec popsu-mysql_d9-1 sh -c 'exec mariadb-dump -uroot -ppopsu popsu_d9' > ./ressources/popsu-d9-$(DATE_NOW)-local.sql

View File

@@ -1,19 +1,19 @@
version: "3.5"
services:
mysql_d7:
image: mariadb:latest
volumes:
- db-data-d7:/var/lib/mysql
- ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro
- "${DB_IMPORTE_FILE_D7}:/docker-entrypoint-initdb.d/popsu_d7.sql"
networks:
- database
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_DATABASE: "${DB_NAME_D7}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
# mysql_d7:
# image: mariadb:latest
# volumes:
# - db-data-d7:/var/lib/mysql
# - ./Docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf:ro
# - "${DB_IMPORTE_FILE_D7}:/docker-entrypoint-initdb.d/popsu_d7.sql"
# networks:
# - database
# environment:
# MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
# MYSQL_DATABASE: "${DB_NAME_D7}"
# MYSQL_USER: "${DB_USERNAME}"
# MYSQL_PASSWORD: "${DB_PASSWORD}"
mysql_d9:
image: mariadb:latest
@@ -38,22 +38,22 @@ services:
ports:
- "6379"
php_d7:
build: ./Docker/php-5.6-fpm/
volumes:
- php-d7-user-data:/home/${USER_UNAME}
- "${PROJECT_ROOT_D7}:/var/www/d7"
working_dir: "/var/www/d7"
networks:
- database
- server
- redis
depends_on:
- mysql_d7
- redis
# php_d7:
# build: ./Docker/php-5.6-fpm/
# volumes:
# - php-d7-user-data:/home/${USER_UNAME}
# - "${PROJECT_ROOT_D7}:/var/www/d7"
# working_dir: "/var/www/d7"
# networks:
# - database
# - server
# - redis
# depends_on:
# - mysql_d7
# - redis
php_d9:
build: ./Docker/php-7.4-fpm/
build: ./Docker/php-8.1-fpm/
user: ${USER_UID}:${USER_GID}
volumes:
- php-d9-user-data:/home/${USER_UNAME}
@@ -66,6 +66,10 @@ services:
- database
- redis
- server
# for xdebug
# https://github.com/docker/for-linux/issues/264#issuecomment-965465879
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- mysql_d9
- redis
@@ -77,10 +81,10 @@ services:
networks:
- database
depends_on:
- mysql_d7
# - mysql_d7
- mysql_d9
environment:
PMA_HOSTS: mysql_d7,mysql_d9
PMA_HOSTS: mysql_d9 #mysql_d7,
nginx:
@@ -89,20 +93,20 @@ services:
- 8980:80
working_dir: "/var/www"
volumes:
- "${PROJECT_ROOT_D7}:/var/www/d7"
# - "${PROJECT_ROOT_D7}:/var/www/d7"
- "${PROJECT_ROOT_D9}:/var/www/d9"
- "${LOG_ROOT}:/var/log:rw"
networks:
- server
depends_on:
- php_d7
# - php_d7
- php_d9
volumes:
db-data-d7:
# db-data-d7:
db-data-d9:
redis-data:
php-d7-user-data:
# php-d7-user-data:
php-d9-user-data:
networks:

View File

@@ -1,18 +1,50 @@
[xdebug]
xdebug.remote_enable=1
; xdebug.remote_enable=1
xdebug.mode=debug
;Should use host.docker.internal but not working on linux
xdebug.remote_host=172.21.0.1
; xdebug.remote_host=172.20.0.1
; Replaced by xdebug.client_host.
xdebug.client_host=host.docker.internal
;Not working on docker context
xdebug.remote_connect_back=0
; xdebug.remote_connect_back=0
; Replaced by xdebug.discover_client_host.
xdebug.discover_client_host=0
;9000 is already bound by php-fpm
xdebug.remote_port=9001
; xdebug.remote_port=9001
; xdebug.remote_port #
; Replaced by xdebug.client_port.
; The default value has also changed from 9000 to 9003.
xdebug.client_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
; xdebug.remote_mode=req
; xdebug.remote_mode #
; For the req value (the original default), use xdebug.mode=debug with xdebug.start_with_request=trigger. If the original xdebug.remote_autostart behaviour is necessary, use xdebug.start_with_request=yes instead of trigger.
; For the jit value, use xdebug.mode=debug and xdebug.start_upon_error=yes.
; xdebug.remote_autostart=true
; Use xdebug.mode=debug with xdebug.start_with_request=yes
xdebug.start_with_request=yes
; ?=XDEBUG_SESSION_START=1
;Log file is mounted on volume so you can follow it
xdebug.remote_log=/var/log/xdebug-error.log
xdebug.profiler_enable_trigger=1
xdebug.profiler_enable=0
xdebug.profiler_output_dir=/var/log/
; xdebug.remote_log=/var/log/xdebug-error.log
; Replaced by xdebug.log, which also includes log messages beyond Step Debugging.
xdebug.log=/var/log/xdebug-error.log
; xdebug.profiler_enable=0
; xdebug.profiler_enable_trigger=1
; Use xdebug.mode=profile with xdebug.start_with_request=trigger.
xdebug.profiler_output_name = cachegrind.out.%t.%R
xdebug.output_dir=/var/log/
; Use the generic xdebug.output_dir setting.
; Example: http://localhost:8080/test?XDEBUG_PROFILE=1

2
src_d9

Submodule src_d9 updated: fa8d7c4347...bded893630