From 6796c52ba8569ca3c12580d072636f29d60c829b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A8ve=20Caillault?= Date: Sun, 25 Oct 2026 15:34:39 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20la=20configuration?= =?UTF-8?q?=20pour=20la=20gestion=20des=20cron.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 4 ++-- .gitignore | 6 +++++- README.md | 1 - docker/docker-compose.apache-php.yml | 2 ++ docker/docker-compose.cron.yml | 26 -------------------------- docker/docker-compose.frankenphp.yml | 8 +++++++- docker/docker-compose.lets-encrypt.yml | 8 -------- host/frankenphp/data/.gitkeep | 0 8 files changed, 16 insertions(+), 39 deletions(-) delete mode 100644 docker/docker-compose.cron.yml create mode 100644 host/frankenphp/data/.gitkeep diff --git a/.env.example b/.env.example index 181e301..37d9eba 100644 --- a/.env.example +++ b/.env.example @@ -21,7 +21,7 @@ COMPOSE_FILE="${COMPOSE_FILE_BASE}" COMPOSE_FILE_SERVER_PHP="${COMPOSE_FILE_APACHE}" # Exemple complet en local -# COMPOSE_FILE="${COMPOSE_FILE_BASE}:${COMPOSE_FILE_SERVER_PHP}:${COMPOSE_FILE_MEMCACHED}:{COMPOSE_FILE_REDIS}:${COMPOSE_FILE_CRON}:${COMPOSE_FILE_UPLOAD}:${COMPOSE_FILE_MAILPIT}:${COMPOSE_FILE_DEV}" +# COMPOSE_FILE="${COMPOSE_FILE_BASE}:${COMPOSE_FILE_SERVER_PHP}:${COMPOSE_FILE_MEMCACHED}:{COMPOSE_FILE_REDIS}:${COMPOSE_FILE_UPLOAD}:${COMPOSE_FILE_MAILPIT}:${COMPOSE_FILE_DEV}" # Pour utiliser Let's Encrypt : # COMPOSE_FILE="${COMPOSE_FILE_BASE}:${COMPOSE_FILE_LETS_ENCRYPT}" @@ -49,7 +49,7 @@ APACHE_ADMIN_EMAIL="" APACHE_ROOT_PATH="/var/www/html" # FrankenPHP -FRANKENPHP_IMAGE="gitea.steve-caillault.dev/steve-caillault/docker-php-image:8.5-frankenphp-1.11.2" +FRANKENPHP_IMAGE="gitea.steve-caillault.dev/steve-caillault/docker-php-image:8.5-frankenphp-1.13.3" FRANKENPHP_ROOT_PATH="/app/" # Image du serveur PHP diff --git a/.gitignore b/.gitignore index 56de0af..798a1d7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,10 @@ host/database/data/* !host/database/data/.gitkeep host/database/backups/* !host/database/backups/.gitkeep +host/frankenphp/data/* +!host/frankenphp/data/.gitkeep upload/* !upload/.gitkeep -.idea \ No newline at end of file +.idea +www +/nbproject/private/ diff --git a/README.md b/README.md index 6ceaf5e..9312ee4 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,6 @@ Voici une description des diffèrents fichiers : | docker-compose.yml | Configuration de base définissant le serveur PHP, la base de données et PHPMyAdmin. | | docker-compose.apache-php.yml | Configuration spécifique pour un serveur Apache. | | docker-compose.frankenphp.yml | Configuration spécifique pour un serveur FrankenPHP. | -| docker-compose.cron.yml | Configuration d'un système de crontab utilisant Supercronic. Les tâches planifiées peuvent être définies dans le fichier `host/crontab`. | | docker-compose.dev.yml | Configuration spécifique en environnement de développement. | | docker-compose.mailpit.yml | Configuration de l'application de consultation des mails en développement. | | docker-compose.memcached.yml | Configuration pour Memcached. | diff --git a/docker/docker-compose.apache-php.yml b/docker/docker-compose.apache-php.yml index 97e0c53..f462bf5 100644 --- a/docker/docker-compose.apache-php.yml +++ b/docker/docker-compose.apache-php.yml @@ -3,6 +3,7 @@ services: server-php: environment: + APP_PATH: ${APP_CONTAINER_PATH} APACHE_ADMIN_EMAIL: ${APACHE_ADMIN_EMAIL} APACHE_ROOT_PATH: ${APACHE_ROOT_PATH} # Configuration en local @@ -14,4 +15,5 @@ services: - ${PWD}/host/apache/conf/vhost.conf:/etc/apache2/sites-available/000-default.conf - ${PWD}/host/apache/conf/apache2.conf:/etc/apache2/conf-enabled/docker.conf - ${PWD}/host/php/conf/${OPCACHE_CONFIG_FILE:-opcache.default.ini}:/usr/local/etc/php/conf.d/opcache.ini + - ${PWD}/host/crontab:/etc/crontab - ${PWD}/upload:/app/public/upload diff --git a/docker/docker-compose.cron.yml b/docker/docker-compose.cron.yml deleted file mode 100644 index 52f258c..0000000 --- a/docker/docker-compose.cron.yml +++ /dev/null @@ -1,26 +0,0 @@ -services: - - cron: - restart: unless-stopped - container_name: ${CONTAINER_PREFIX}_cron - - build: - context: ${PWD} - args: - IMAGE: ${SERVER_PHP_IMAGE} - dockerfile: ${PWD}/docker/cron.dockerfile - - command: supercronic /etc/crontab - - environment: - APP_PATH: ${APP_CONTAINER_PATH} - - volumes: - - ${PWD}/${APP_HOST_PATH}:${APP_CONTAINER_PATH} - - ${PWD}/host/crontab:/etc/crontab - - depends_on: - - server-php - - healthcheck: - disable: true \ No newline at end of file diff --git a/docker/docker-compose.frankenphp.yml b/docker/docker-compose.frankenphp.yml index b183bf4..6bb7818 100644 --- a/docker/docker-compose.frankenphp.yml +++ b/docker/docker-compose.frankenphp.yml @@ -3,14 +3,20 @@ services: server-php: environment: + APP_PATH: ${APP_CONTAINER_PATH} FRANKENPHP_ROOT_PATH: ${FRANKENPHP_ROOT_PATH} + XDG_DATA_HOME: /data + XDG_CONFIG_HOME: /config # Configuration en local VITE_PORT: ${VITE_PORT} volumes: - ${PWD}/${APP_HOST_PATH}:${APP_CONTAINER_PATH} - - ${PWD}/host/frankenphp/conf/Caddyfile:/etc/frankenphp/Caddyfile + - ${PWD}/host/frankenphp/conf/Caddyfile:/etc/caddy/Caddyfile + - ${PWD}/host/frankenphp/data:/data + - ${PWD}/host/frankenphp/config:/config - ${PWD}/host/php/conf/${OPCACHE_CONFIG_FILE:-opcache.default.ini}:/usr/local/etc/php/conf.d/opcache.ini + - ${PWD}/host/crontab:/etc/crontab - ${PWD}/upload:/app/public/upload healthcheck: diff --git a/docker/docker-compose.lets-encrypt.yml b/docker/docker-compose.lets-encrypt.yml index 59d646e..9c3be2a 100644 --- a/docker/docker-compose.lets-encrypt.yml +++ b/docker/docker-compose.lets-encrypt.yml @@ -1,13 +1,5 @@ services: - traefik: - command: - - "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}" - - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json" - - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web" - volumes: - - ${PWD}/certs/letsencrypt:/letsencrypt - server-php: labels: - traefik.http.routers.${CONTAINER_PREFIX}_server_php.tls.certresolver=letsencrypt diff --git a/host/frankenphp/data/.gitkeep b/host/frankenphp/data/.gitkeep new file mode 100644 index 0000000..e69de29