Fix Docker environment: PHP 8.1, netcat, and env variables#223
Open
calebrio02 wants to merge 2 commits intoCRLibre:v4.4from
Open
Fix Docker environment: PHP 8.1, netcat, and env variables#223calebrio02 wants to merge 2 commits intoCRLibre:v4.4from
calebrio02 wants to merge 2 commits intoCRLibre:v4.4from
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Arreglo de Entorno Docker y Configuración (Fix Docker Environment)
Descripción
Este PR corrige varios problemas que impedían construir y ejecutar el contenedor Docker en entornos modernos y corregir errores de configuración en el despliegue.
Cambios Realizados y Justificación
1. Actualización de Dockerfile (Infraestructura)
php:7.4-apacheaphp:8.1-apache.404 Not Foundal intentar hacerapt-get update. PHP 8.1 es una versión con soporte activo y retrocompatible para este proyecto.netcatpornetcat-openbsd.netcates virtual y no se puede instalar directamente. Se debe especificarnetcat-openbsdonetcat-traditional.dos2unixy se ejecutó sobredocker-entrypoint.sh.exec user process caused: no such file or directory.2. Actualización de docker-compose.yml (Configuración)
DB_HOST,core_install,cryptoKey, etc.) en la secciónenvironmentdel serviciophp-apache..enval contenedor a menos que se declaren. Sin esto, la aplicación PHP fallaba al conectar a la base de datos o encontrar la carpetaapiporque las variables llegaban vacías.mariadbpara usar los nombres estándar de la imagen oficial (MYSQL_USER,MYSQL_PASSWORD,MYSQL_DATABASE) en lugar de nombres personalizados.mariadbsolo crea el usuario y la base de datos inicial si recibe estas variables específicas. Antes, la base de datos se inicializaba vacía (sin usuario/password correctos), causando errores de "Access denied".${VAR:-default}) endocker-compose.yml..envcompleto desde el inicio.Verificación
docker-compose buildse ejecuta exitosamente sin errores de repositorio.docker-compose up -dlevanta los servicios correctamente.http://localhost:8080/api.php?w=ejemplo&r=holadevuelve la respuesta esperadahola :).