Skip to content

Commit

Permalink
review #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Bianco committed Mar 8, 2021
1 parent 3b64a0a commit a2a9d26
Show file tree
Hide file tree
Showing 71 changed files with 447 additions and 231 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
version=6.0.0
install=
1 change: 0 additions & 1 deletion 5.1.0/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.1.0/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.2.0-RC/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.2.0-RC/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.2.0-VB1/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.2.0-VB1/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.2.0-VB2/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.2.0-VB2/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.2.0/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.2.0/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.2.1/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.2.1/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.3.0-RC/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.3.0-RC/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.3.0/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.3.0/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.4.0-RC/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.4.0-RC/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
1 change: 0 additions & 1 deletion 5.4.0/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
18 changes: 13 additions & 5 deletions 5.4.0/vtiger-foreground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ service apache2 start >/dev/null 2>&1
printenv | sed 's/^\(.*\)$/export \1/g' | grep -E '^export MYSQL_|^export VT_' > /run/crond.env

## import database using environment variables
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php
if [[ -n "${VT_INSTALL}" ]]; then
cd /usr/src/vtiger
loading "Waiting for database..."
echo "[vtiger] Waiting for available database..."
echo -n "[vtiger] " && mysql-import --do-while vtiger.sql
#php vtiger-startup.php

## Remove default config.inc.php if VT_INSTALL is false
if [[ -f /var/www/html/config.inc.php ]]; then
echo "[vtiger] Create configuration files..."
cp config.inc.php /var/www/html/config.inc.php
fi
fi

## fill current mounted volume
loading "Waiting for volume preparation..."
Expand Down
21 changes: 12 additions & 9 deletions 6.0.0-Beta/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM php:5.6.40-apache
LABEL maintainer='Francesco Bianco <info@javanile.org>'

ENV VT_VERSION=6.0.0-Beta \
ENV VT_INSTALL=1 \
VT_VERSION=6.0.0-Beta \
VT_DOWNLOAD=http://sourceforge.net/projects/vtigercrm/files/vtiger%20CRM%206.0%20Beta/Core%20Product/vtigercrm-6.0Beta.tar.gz \
DATABASE_PACKAGE=mariadb-server-10.1 \
COMPOSER_ALLOW_SUPERUSER=1 \
Expand All @@ -10,37 +11,39 @@ ENV VT_VERSION=6.0.0-Beta \
WORKDIR /usr/src/vtiger

COPY php.ini /usr/local/etc/php/
COPY vtiger.json /usr/src/vtiger/
COPY .symvol /usr/src/vtiger/
COPY vtiger-ssl.* /etc/apache2/ssl/
COPY 000-default.conf /etc/apache2/sites-available/

RUN apt-get update && \
apt-get install --no-install-recommends -y zlib1g-dev libc-client-dev libkrb5-dev cron rsyslog unzip && \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install imap exif mysql mysqli pdo pdo_mysql zip && \
curl -sL https://javanile.github.io/symvol/setup.sh?v=0.0.2 | bash - && \
curl -o composer.phar -sL https://getcomposer.org/composer.phar && \
php composer.phar --ansi require javanile/http-robot:0.0.2 && \
php composer.phar --ansi global require javanile/mysql-import:0.0.11 javanile/vtiger-cli:0.0.3 && \
php composer.phar --ansi global require javanile/http-robot:0.0.2 javanile/mysql-import:0.0.11 javanile/vtiger-cli:0.0.3 && \
usermod -u 1000 www-data && groupmod -g 1000 www-data && \
echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
curl -o vtiger.tar.gz -sL "$VT_DOWNLOAD" && tar -xzf vtiger.tar.gz && rm vtiger.tar.gz && \
rm -fr /var/www/html && mv "vtigerCRM" /var/www/html && \
vtiger permissions --fix && \
a2enmod ssl && a2enmod rewrite && \
apt-get clean && php composer.phar clearcache && \
mv .symvol /var/www/html && \
mkdir -p volume /var/lib/vtiger && \
rm -rf composer.phar /tmp/* /var/tmp/* /var/lib/apt/lists/* /etc/cron.*

COPY develop-install.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/develop-install.sh && develop-install.sh
COPY vtiger-*.sh /usr/local/bin/
COPY vtiger-*.php /usr/src/vtiger/
COPY crontab /etc/cron.d/crontab

RUN chmod +x /usr/local/bin/vtiger-*.sh && vtiger-install.sh --assert-mysql --dump --remove-mysql
COPY LoggerManager.php /var/www/html/libraries/log4php/
COPY config.inc.php config.performance.php /var/www/html/
COPY vtiger.json config.inc.php /usr/src/vtiger/
COPY config.performance.php loading.php /var/www/html/

VOLUME ["/var/www/html/storage", "/var/www/html/logs"]
RUN sed -i 's/^error_reporting = .*$/error_reporting = E_ALL \& ~E_WARNING \& ~E_NOTICE \& ~E_DEPRECATED \& ~E_STRICT/' /usr/local/etc/php/php.ini

VOLUME ["/var/lib/vtiger"]

WORKDIR /app

Expand Down
1 change: 0 additions & 1 deletion 6.0.0-Beta/php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ log_errors = On
short_open_tag = Off
error_log = /var/www/html/logs/php.log
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
max_execution_time = 0
memory_limit = 4G
post_max_size = 4G
Expand Down
Loading

0 comments on commit a2a9d26

Please sign in to comment.