diff --git a/.dockerignore b/.dockerignore
index 1f8a1af71..1d8b100d2 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -5,7 +5,8 @@
.editorconfig
.env
.eslint*
-**/node_modules/
+exports
+**/node_modules
**/dist
**/cache
docker-compose.yml
diff --git a/.idea/runConfigurations/Mutagen_daemon_start.xml b/.idea/runConfigurations/Mutagen_daemon_start.xml
index 951013261..705db344c 100644
--- a/.idea/runConfigurations/Mutagen_daemon_start.xml
+++ b/.idea/runConfigurations/Mutagen_daemon_start.xml
@@ -13,7 +13,7 @@
-
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Mutagen_install.xml b/.idea/runConfigurations/Mutagen_install.xml
new file mode 100644
index 000000000..315a87edf
--- /dev/null
+++ b/.idea/runConfigurations/Mutagen_install.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Mutagen_start.xml b/.idea/runConfigurations/Mutagen_start.xml
index 1d602add9..6f0940e35 100644
--- a/.idea/runConfigurations/Mutagen_start.xml
+++ b/.idea/runConfigurations/Mutagen_start.xml
@@ -13,7 +13,7 @@
-
+
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 27771bf1b..6f79fac44 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -75,11 +75,11 @@ COPY docker/php/conf.d/error_reporting.ini /usr/local/etc/php/conf.d/error_repor
RUN install-php-extensions xdebug
COPY docker/php/conf.d/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
-#COPY --from=builder --chown=www-data:www-data app ./pvm
+COPY --from=builder --chown=www-data:www-data app ./pvm
USER www-data
-#RUN touch pvm/.env \
-# && printenv | sed 's/\(^[^=]*\)=\(.*\)/\1="\2"/' > pvm/.env
+RUN touch pvm/.env \
+ && printenv | sed 's/\(^[^=]*\)=\(.*\)/\1="\2"/' > pvm/.env
EXPOSE 80
EXPOSE 9003
diff --git a/Dockerfile.dev b/Dockerfile.dev
new file mode 100644
index 000000000..4a534b04c
--- /dev/null
+++ b/Dockerfile.dev
@@ -0,0 +1,40 @@
+# syntax=docker/dockerfile:1
+
+ARG PHP_VERSION="7.4"
+
+# Immagine finale
+FROM php:${PHP_VERSION}-apache-bullseye AS final
+
+# Enable Apache modules to ensure proper functionality
+RUN a2enmod rewrite
+
+ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
+
+COPY docker/php/php.ini $PHP_INI_DIR/php.ini
+
+# Imposto la lingua delle date
+ENV LC_TIME=it_IT.UTF-8
+
+RUN apt-get update && apt-get install -y --no-install-recommends locales \
+ && apt-get clean \
+ && apt-get autoremove -y \
+ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
+ && echo it_IT.UTF-8 UTF-8 >> /etc/locale.gen \
+ && locale-gen \
+ && install-php-extensions \
+ gd \
+ imagick \
+ zip
+
+COPY docker/apache/000-default.conf $APACHE_CONFDIR/sites-available/000-default.conf
+
+WORKDIR /var/www/html
+
+COPY docker/php/conf.d/error_reporting.ini /usr/local/etc/php/conf.d/error_reporting.ini
+RUN install-php-extensions xdebug
+COPY docker/php/conf.d/xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
+
+USER www-data
+
+EXPOSE 80
+EXPOSE 9003
\ No newline at end of file
diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy
index b1a3e4629..fc0e97cdc 100644
--- a/Jenkinsfile.groovy
+++ b/Jenkinsfile.groovy
@@ -42,9 +42,9 @@ pipeline {
// bat 'cd public_html && npm install --omit=dev'
- if (NODE_ENV == 'development') {
+ if (env.NODE_ENV == 'development') {
bat '7za a public_html.zip "%WORKSPACE%\\public_html" -tzip'
- } else if (NODE_ENV == 'production') {
+ } else if (env.NODE_ENV == 'production') {
bat 'grunt BuildAll'
}
}
@@ -111,10 +111,14 @@ sudo /bin/chmod -R 777 /var/www/portale/cache''', execTimeout: 120000, flatten:
script {
def branchVersion = ""
- def target = "final-prod"
if (env.BRANCH_NAME != "master") {
branchVersion = "-${env.BRANCH_NAME.toLowerCase().replace('/', '-')}"
+ }
+
+ def target = "final-prod"
+
+ if (env.NODE_ENV == "development") {
target = "final-dev"
}
diff --git a/docker-compose.yml b/docker-compose.yml
index 1c42b2f24..96aafd543 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,8 +9,7 @@ services:
php-apache:
build:
- dockerfile: ./Dockerfile
- target: final-dev
+ dockerfile: ./Dockerfile.dev
restart: unless-stopped
container_name: php-apache
extra_hosts: