Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
/facturascripts/
/mysql/
.DS_Store
.vscode
.vscode

/test/*/facturascripts
29 changes: 28 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,3 +22,30 @@ services:
restart: always
ports:
- 8080:8080

# facturascripts74:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Te has dejado un montón de código comentado. Mejor quítalo.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

El código comentado se refiere a las demás versiones.

# build:
# context: ./test/php74
# restart: always
# ports:
# - 8081:80
# volumes:
# - ./test/php74/facturascripts:/var/www/html

# facturascripts80:
# build:
# context: ./test/php80
# restart: always
# ports:
# - 8082:80
# volumes:
# - ./test/php80/facturascripts:/var/www/html

# facturascripts81:
# build:
# context: ./test/php81
# restart: always
# ports:
# - 8083:80
# volumes:
# - ./test/php81/facturascripts:/var/www/html
31 changes: 31 additions & 0 deletions test/php74/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Por qué ../../ ???

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

porque referencia al script original, así se evita copiar y pegar el archivo 3 veces.

31 changes: 31 additions & 0 deletions test/php80/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
31 changes: 31 additions & 0 deletions test/php81/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]