First commit

This commit is contained in:
2026-01-06 10:50:33 +01:00
parent b34fb8e3df
commit 8ea211835f
69 changed files with 23747 additions and 0 deletions

133
docker/php/Dockerfile Normal file
View File

@@ -0,0 +1,133 @@
ARG DOCKER_PHP_VERSION
FROM php:${DOCKER_PHP_VERSION}-apache-bullseye
ARG DOCKER_NODE_VERSION
ENV DOCKER_NODE_VERSION="${DOCKER_NODE_VERSION}"
# Installer les dépendances et extensions PHP nécessaires
RUN apt-get update && apt-get install -y \
libicu-dev \
libpq-dev \
libpng-dev \
libzip-dev \
libxml2-dev \
ca-certificates \
gnupg \
libbz2-dev \
libgmp-dev \
libldap2-dev \
libonig-dev \
libsodium-dev \
libxslt1-dev \
unixodbc-dev \
libsqlite3-dev \
zlib1g-dev \
libssl-dev \
libc-client-dev \
libkrb5-dev \
freetds-dev \
vim \
tcpdump \
dnsutils \
wget \
git \
unzip \
&& docker-php-ext-install -j$(nproc) \
intl \
zip \
bcmath \
bz2 \
calendar \
exif \
gd \
gettext \
gmp \
ldap \
# mysqli \
pcntl \
pdo_pgsql \
# pdo_mysql \
# pdo_sqlite \
# pdo_sqlsrv \
soap \
sockets \
sysvsem \
xsl
# Installation de node
RUN wget -qO- "https://nodejs.org/dist/v${DOCKER_NODE_VERSION}/node-v${DOCKER_NODE_VERSION}-linux-x64.tar.xz" | tar xJC /tmp/ && \
cp -r /tmp/node-v${DOCKER_NODE_VERSION}-linux-x64/bin /usr/ && \
cp -r /tmp/node-v${DOCKER_NODE_VERSION}-linux-x64/include /usr/ && \
cp -r /tmp/node-v${DOCKER_NODE_VERSION}-linux-x64/lib /usr/ && \
cp -r /tmp/node-v${DOCKER_NODE_VERSION}-linux-x64/share /usr/ && \
npm install --global yarn
# installation/activation d'extensions php
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug && \
docker-php-ext-install zip && \
docker-php-ext-install gd && \
docker-php-ext-install soap && \
docker-php-ext-configure intl && \
docker-php-ext-install intl
# Configuration spéciale pour quelques extensions
# RUN docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr && \
# docker-php-ext-install pdo_odbc \
RUN docker-php-ext-enable opcache
# Configurer Oracle OCI8 (nécessite le SDK Oracle, à installer manuellement ou à lier via les dépendances)
#RUN apt-get update && apt-get -y install wget unzip libaio1 && \
# wget https://download.oracle.com/otn_software/linux/instantclient/2340000/instantclient-basic-linux.x64-23.4.0.24.05.zip && \
# unzip -o instantclient-basic-linux.x64-23.4.0.24.05.zip -d /usr/local && \
# wget https://download.oracle.com/otn_software/linux/instantclient/2340000/instantclient-sdk-linux.x64-23.4.0.24.05.zip && \
# unzip -o instantclient-sdk-linux.x64-23.4.0.24.05.zip -d /usr/local
#
#RUN echo 'instantclient,/usr/local/instantclient_23_4' | pecl install oci8-3.4.0 \
# && docker-php-ext-enable oci8
#
#ENV ORACLE_BASE /usr/local/instantclient_23_4
#ENV LD_LIBRARY_PATH /usr/local/instantclient_23_4
#ENV TNS_ADMIN /usr/local/instantclient_23_4
#ENV ORACLE_HOME /usr/local/instantclient_23_4
# Configuration pour utiliser Kerberos avec IMAP (si nécessaire)
# RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
# && docker-php-ext-install imap
# installation de composer
RUN rm -rf /var/cache/apk/* && rm -rf /tmp/* && \
curl --insecure https://getcomposer.org/composer.phar -o /usr/bin/composer && chmod +x /usr/bin/composer
# Création de la structure du projet
RUN mkdir /var/www/html/APPLI && \
mkdir /var/www/html/BATCH && \
mkdir /var/www/html/DATA && \
mkdir /var/www/html/LOG && \
mkdir /var/www/html/PARAM
RUN ln -s /var/www/html/APPLI /var/www/html/CURRENT
# Activation du module pour Apache2 proxy_http et rewrite
RUN a2enmod proxy_http && \
a2enmod rewrite
###> User ###
ARG CURRENT_UID
ARG CURRENT_GID
# mapping du user host avec www-data
RUN usermod -o -u ${CURRENT_UID} www-data && groupmod -o -g ${CURRENT_GID} www-data
RUN chown www-data:www-data -R /var/www/*
RUN chown www-data:www-data -R /var/www/.*
###< User ###
RUN rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/*
WORKDIR /var/www/html/APPLI
EXPOSE 80

View File

@@ -0,0 +1,10 @@
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20240924/xdebug.so
xdebug.mode=debug
xdebug.idekey=PHPSTORM
xdebug.start_with_request=yes
xdebug.discover_client_host=no
xdebug.client_port=9003
xdebug.log="/var/www/html/LOG/xdebug.log"
xdebug.log_level = 0
xdebug.client_host=host.docker.internal
xdebug.connect_timeout_ms=2

View File

@@ -0,0 +1,4 @@
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Paris

View File

@@ -0,0 +1,26 @@
<VirtualHost *:80>
DocumentRoot /var/www/html/CURRENT
AliasMatch "^/api(/.*)?" "/var/www/html/CURRENT/public$1"
<Directory /var/www/html/CURRENT/public>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
AliasMatch "^(/.*)?" "/var/www/html/CURRENT/frontend/dist$1"
<Directory /var/www/html/CURRENT/frontend/dist>
AllowOverride All
Order allow,deny
Allow from All
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.html [L]
</Directory>
ErrorLog "${APACHE_LOG_DIR}/error.log"
CustomLog "${APACHE_LOG_DIR}/access.log" combined
</VirtualHost>