diff --git a/.idea/php.xml b/.idea/php.xml
index 8d7be94..216185d 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -12,137 +12,137 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
-
+
+
+
-
-
+
+
-
-
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docker-compose.yml b/docker-compose.yml
index 3babad3..8af8efa 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -11,9 +11,11 @@ services:
CURRENT_GID: ${CURRENT_GID}
environment:
PHP_IDE_CONFIG: serverName=${DOCKER_APP_NAME}-docker
+ XDEBUG_CLIENT_HOST: ${XDEBUG_CLIENT_HOST:-host.docker.internal}
+ XDEBUG_CONFIG: client_host=${XDEBUG_CLIENT_HOST:-host.docker.internal} client_port=9003
DATABASE_URL: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?serverVersion=16&charset=utf8"
volumes:
- - ./:/var/www/html/CURRENT
+ - ./:/var/www/html
- ~/.cache:/var/www/.cache # Pour la cache de composer
- ~/.config:/var/www/.config # Pour la config de yarn
- ~/.composer:/var/www/.composer # Pour la config de composer
@@ -22,6 +24,8 @@ services:
- ./docker/php/config/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./LOG:/var/www/html/LOG
- ./LOG/logs_apache:/var/log/apache2/
+ extra_hosts:
+ - "host.docker.internal:host-gateway"
depends_on:
- db
ports:
diff --git a/docker/.env.docker b/docker/.env.docker
index 44a7f3f..093370a 100644
--- a/docker/.env.docker
+++ b/docker/.env.docker
@@ -6,3 +6,4 @@ POSTGRES_DB=ferme
POSTGRES_USER=root
POSTGRES_PASSWORD=root
POSTGRES_PORT=5432
+XDEBUG_CLIENT_HOST=host.docker.internal
diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile
index f7603b3..f95431d 100644
--- a/docker/php/Dockerfile
+++ b/docker/php/Dockerfile
@@ -103,12 +103,7 @@ 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
+RUN mkdir /var/www/html/LOG
# Activation du module pour Apache2 proxy_http et rewrite
RUN a2enmod proxy_http && \
@@ -128,6 +123,6 @@ RUN rm -rf \
/tmp/* \
/var/tmp/*
-WORKDIR /var/www/html/APPLI
+WORKDIR /var/www/html
EXPOSE 80
diff --git a/docker/php/config/docker-php-ext-xdebug.ini b/docker/php/config/docker-php-ext-xdebug.ini
index 5918932..e09a954 100644
--- a/docker/php/config/docker-php-ext-xdebug.ini
+++ b/docker/php/config/docker-php-ext-xdebug.ini
@@ -2,9 +2,8 @@ zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20240924/xdebug.
xdebug.mode=debug
xdebug.idekey=PHPSTORM
xdebug.start_with_request=yes
-xdebug.discover_client_host=no
+xdebug.discover_client_host=1
xdebug.client_port=9003
xdebug.log="/var/www/html/LOG/xdebug.log"
-xdebug.log_level = 0
-xdebug.client_host=host.docker.internal
+xdebug.log_level=0
xdebug.connect_timeout_ms=2
diff --git a/docker/php/config/vhost.conf b/docker/php/config/vhost.conf
index 4b91955..e23c743 100644
--- a/docker/php/config/vhost.conf
+++ b/docker/php/config/vhost.conf
@@ -1,15 +1,15 @@
- DocumentRoot /var/www/html/CURRENT
+ DocumentRoot /var/www/html
- AliasMatch "^/api(/.*)?" "/var/www/html/CURRENT/public$1"
-
+ AliasMatch "^/api(/.*)?" "/var/www/html/public$1"
+
Options FollowSymLinks
AllowOverride All
Require all granted
- AliasMatch "^(/.*)?" "/var/www/html/CURRENT/frontend/dist$1"
-
+ AliasMatch "^(/.*)?" "/var/www/html/frontend/dist$1"
+
AllowOverride All
Order allow,deny
Allow from All