Compare commits

..
3 Commits
Author SHA1 Message Date
bachir e16fe66472 src new commits 2026-09-29 11:15:33 +02:00
bachir 91f60d4338 make mobile debug connexion 2026-09-29 11:15:05 +02:00
bachir edb99f49c0 docker php8.4 ready 2026-09-29 11:14:41 +02:00
12 changed files with 124 additions and 4 deletions
+4
View File
@@ -34,4 +34,8 @@ server {
location ~ /\.ht {
deny all;
}
location ~ \.mjs$ {
default_type application/javascript;
}
}
+65
View File
@@ -0,0 +1,65 @@
FROM php:8.4-fpm
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
mariadb-client \
zip \
libzip-dev
# docker-php-ext-install -j$(nproc) iconv && \
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
apt-get install -y imagemagick libmagickwand-dev && \
pecl install imagick && docker-php-ext-enable imagick && \
docker-php-ext-install -j$(nproc) gd && \
docker-php-ext-install pdo_mysql zip && \
docker-php-ext-install opcache && \
docker-php-ext-install bcmath
RUN apt-get install -y git vim
RUN pecl install redis && \
docker-php-ext-enable redis
RUN pecl install xdebug && \
docker-php-ext-enable xdebug
RUN export COMPOSER_HOME=/usr/local/composer && \
curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer && \
curl https://github.com/drush-ops/drush-launcher/releases/download/0.6.0/drush.phar \
-L -o /usr/local/bin/drush && \
chmod +x /usr/local/bin/drush
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"]
COPY ./php-custom.ini /usr/local/etc/php/conf.d/php-custom.ini
# COPY ./php-fpm-custom.conf /usr/local/etc/php-fpm.d/php-fpm-custom.conf
# COPY ./bashrc /root/.bashrc
# COPY ./inputrc /root/.inputrc
ARG USER_UID
ARG USER_UNAME
ARG USER_GID
ARG USER_GNAME
RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi &&\
groupadd -g ${USER_GID} ${USER_GNAME} &&\
useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME} &&\
install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME} &&\
chown --changes --silent --no-dereference --recursive \
--from=33:33 ${USER_UID}:${USER_GID} \
/home/${USER_UNAME}
# /.composer \
# /var/run/php-fpm \
# /var/lib/php/sessions \
COPY ./bashrc /home/${USER_UNAME}/.bashrc
COPY ./inputrc /home/${USER_UNAME}/.inputrc
USER ${USER_UNAME}
+4
View File
@@ -0,0 +1,4 @@
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'
+2
View File
@@ -0,0 +1,2 @@
set show-all-if-ambiguous on
set completion-ignore-case on
+9
View File
@@ -0,0 +1,9 @@
memory_limit = 8192M
upload_max_filesize = 50M
post_max_size = 50M
max_execution_time = 150
; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
log_level = debug
+1
View File
@@ -0,0 +1 @@
request_terminate_timeout = 150
+1
View File
@@ -0,0 +1 @@
local6.* /var/log/drupal.log
+17
View File
@@ -0,0 +1,17 @@
[Unit]
Description=rsyslog
After=docker.service
Requires=docker.service
[Service]
ExecStartPre=-/usr/bin/docker rm %n
ExecStart=/usr/bin/docker run --rm \
--name %n \
-h %H \
jumanjiman/rsyslog
ExecStop=/usr/bin/docker stop %n
RestartSec=5s
Restart=always
[Install]
WantedBy=multi-user.target
+16
View File
@@ -84,3 +84,19 @@ exec_mysql:
dump_db:
docker exec leshed-mysql-1 sh -c 'exec mariadb-dump -uroot -pleshed leshed' > ./ressources/leshed-$(DATE_NOW)-local.sql
# Test sur mobile : connexion ADB sans fil + tunnel vers le serveur Vite (HMR).
# Le port du débogage sans fil change à chaque activation : on le passe
# (make mobile MOBILE=192.168.1.101:37495) ou on le laisse trouver par nmap.
# L'appareil doit avoir été associé une fois (adb pair IP:PORT CODE).
MOBILE ?= 192.168.1.101
mobile:
@target="$(MOBILE)"; \
case "$$target" in *:*) ;; *) \
port=$$(nmap -Pn -p 30000-50000 --min-rate 3000 -T4 "$$target" | awk -F/ '/open/ {print $$1; exit}'); \
[ -n "$$port" ] || { echo "Aucun port ADB trouvé sur $$target (débogage sans fil actif ?)"; exit 1; }; \
target="$$target:$$port";; \
esac; \
adb connect "$$target" && adb -s "$$target" reverse tcp:5173 tcp:5173 && \
echo "OK : $$target, localhost:5173 du mobile -> Vite du laptop. Firefox : about:debugging"
+2 -1
View File
@@ -24,7 +24,7 @@ services:
- "6379"
php:
build: ./Docker/php-8.3-fpm/
build: ./Docker/php-8.4-fpm/
user: ${USER_UID}:${USER_GID}
volumes:
- php-user-data:/home/${USER_UNAME}
@@ -34,6 +34,7 @@ services:
working_dir: "/var/www/leshed/"
environment:
- APP_ENV=development
- XDEBUG_MODE=debug
networks:
- database
- redis
+2 -2
View File
@@ -893,9 +893,9 @@ $settings['migrate_node_migrate_type_classic'] = FALSE;
# include $app_root . '/' . $site_path . '/settings.local.php';
# }
$databases['default']['default'] = array (
'database' => 'mathallo',
'database' => 'leshed',
'username' => 'root',
'password' => 'mathallo',
'password' => 'leshed',
'prefix' => '',
'host' => 'mysql',
'port' => '3306',
+1 -1
Submodule src updated: 3b9f726376...7581ab9333