diff --git a/.gitignore b/.gitignore index 898bb01..af2da23 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,6 @@ /facturascripts/ /mysql/ .DS_Store -.vscode \ No newline at end of file +.vscode + +/test/*/facturascripts \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 6bccafa..fd64a2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ services: mysql: image: mysql:8.0 - command: --default-authentication-plugin=mysql_native_password + command: --authentication_policy=mysql_native_password restart: always environment: MYSQL_ROOT_PASSWORD: mypassword diff --git a/test/php74/Dockerfile b/test/php74/Dockerfile new file mode 100644 index 0000000..682f7de --- /dev/null +++ b/test/php74/Dockerfile @@ -0,0 +1,31 @@ +FROM php:7.4-apache + +# Install dependencies +RUN apt-get update && \ + apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libpq-dev libzip-dev unzip libxml2-dev && \ + apt-get clean && \ + a2enmod rewrite + +# Install GD +RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ +RUN docker-php-ext-install gd + +# Install other extensions one by one +RUN docker-php-ext-install bcmath +RUN docker-php-ext-install mysqli pdo pdo_mysql pgsql zip +RUN docker-php-ext-install soap + +ENV FS_VERSION 2024.94 + +# Download FacturaScripts +ADD https://facturascripts.com/DownloadBuild/1/${FS_VERSION} /tmp/facturascripts.zip + +# Unzip +RUN unzip -q /tmp/facturascripts.zip -d /usr/src/; \ + rm -rf /tmp/facturascripts.zip + +VOLUME /var/www/html + +COPY facturascripts.sh /usr/local/bin/facturascripts +RUN chmod +x /usr/local/bin/facturascripts +CMD ["facturascripts"] diff --git a/test/php74/facturascripts.sh b/test/php74/facturascripts.sh new file mode 100644 index 0000000..c77234f --- /dev/null +++ b/test/php74/facturascripts.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +FILE=/var/www/html/.htaccess +if [ ! -f "$FILE" ]; then + cp -r /usr/src/facturascripts/* /var/www/html/; \ + chmod -R o+w /var/www/html +fi + +apache2-foreground \ No newline at end of file diff --git a/test/php80/Dockerfile b/test/php80/Dockerfile new file mode 100644 index 0000000..8e0fba3 --- /dev/null +++ b/test/php80/Dockerfile @@ -0,0 +1,31 @@ +FROM php:8.0-apache + +# Install dependencies +RUN apt-get update && \ + apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libpq-dev libzip-dev unzip libxml2-dev && \ + apt-get clean && \ + a2enmod rewrite + +# Install GD +RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ +RUN docker-php-ext-install gd + +# Install other extensions one by one +RUN docker-php-ext-install bcmath +RUN docker-php-ext-install mysqli pdo pdo_mysql pgsql zip +RUN docker-php-ext-install soap + +ENV FS_VERSION 2024.94 + +# Download FacturaScripts +ADD https://facturascripts.com/DownloadBuild/1/${FS_VERSION} /tmp/facturascripts.zip + +# Unzip +RUN unzip -q /tmp/facturascripts.zip -d /usr/src/; \ + rm -rf /tmp/facturascripts.zip + +VOLUME /var/www/html + +COPY facturascripts.sh /usr/local/bin/facturascripts +RUN chmod +x /usr/local/bin/facturascripts +CMD ["facturascripts"] diff --git a/test/php80/facturascripts.sh b/test/php80/facturascripts.sh new file mode 100644 index 0000000..c77234f --- /dev/null +++ b/test/php80/facturascripts.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +FILE=/var/www/html/.htaccess +if [ ! -f "$FILE" ]; then + cp -r /usr/src/facturascripts/* /var/www/html/; \ + chmod -R o+w /var/www/html +fi + +apache2-foreground \ No newline at end of file diff --git a/test/php81/Dockerfile b/test/php81/Dockerfile new file mode 100644 index 0000000..2683f69 --- /dev/null +++ b/test/php81/Dockerfile @@ -0,0 +1,31 @@ +FROM php:8.1-apache + +# Install dependencies +RUN apt-get update && \ + apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libpq-dev libzip-dev unzip libxml2-dev && \ + apt-get clean && \ + a2enmod rewrite + +# Install GD +RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ +RUN docker-php-ext-install gd + +# Install other extensions one by one +RUN docker-php-ext-install bcmath +RUN docker-php-ext-install mysqli pdo pdo_mysql pgsql zip +RUN docker-php-ext-install soap + +ENV FS_VERSION 2024.94 + +# Download FacturaScripts +ADD https://facturascripts.com/DownloadBuild/1/${FS_VERSION} /tmp/facturascripts.zip + +# Unzip +RUN unzip -q /tmp/facturascripts.zip -d /usr/src/; \ + rm -rf /tmp/facturascripts.zip + +VOLUME /var/www/html + +COPY facturascripts.sh /usr/local/bin/facturascripts +RUN chmod +x /usr/local/bin/facturascripts +CMD ["facturascripts"] diff --git a/test/php81/facturascripts.sh b/test/php81/facturascripts.sh new file mode 100644 index 0000000..c77234f --- /dev/null +++ b/test/php81/facturascripts.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +FILE=/var/www/html/.htaccess +if [ ! -f "$FILE" ]; then + cp -r /usr/src/facturascripts/* /var/www/html/; \ + chmod -R o+w /var/www/html +fi + +apache2-foreground \ No newline at end of file