File tree Expand file tree Collapse file tree 18 files changed +126
-9
lines changed
Expand file tree Collapse file tree 18 files changed +126
-9
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ FROM ${ARCH}php:%PHP_BASE_IMAGE%
77# Modified according to the GPL license by developers of the Dolibarr community:
88# 2024 Alois Micard
99# 2024 Laurent Destailleur
10+ # 2025 Renato de Castro Ferreira
1011LABEL maintainer="The Dolibarr foundation <
[email protected] >"
1112
1213ENV DOLI_VERSION=%DOLI_VERSION%
@@ -18,6 +19,7 @@ ENV DOLI_DB_TYPE=mysqli
1819ENV DOLI_DB_HOST=mysql
1920ENV DOLI_DB_HOST_PORT=3306
2021ENV DOLI_DB_NAME=dolidb
22+ ENV DOLI_DB_SSL=true
2123
2224ENV DOLI_URL_ROOT='http://localhost'
2325
Original file line number Diff line number Diff line change @@ -59,7 +59,16 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
5959\$ dolibarr_main_url_root_alt='/custom';
6060\$ dolibarr_main_document_root_alt='/var/www/html/custom';
6161\$ dolibarr_main_data_root='/var/www/documents';
62- \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';
62+ EOF
63+
64+ # Check if SSL is enabled for the database
65+ if [[ " ${DOLI_DB_SSL} " == " true" && " ${DOLI_DB_TYPE} " == " mysqli" ]]; then
66+ echo " \$ dolibarr_main_db_host='ssl://${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
67+ else
68+ echo " \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
69+ fi
70+
71+ cat > /var/www/html/conf/conf.php << EOF
6372\$ dolibarr_main_db_port='${DOLI_DB_HOST_PORT} ';
6473\$ dolibarr_main_db_name='${DOLI_DB_NAME} ';
6574\$ dolibarr_main_db_prefix='llx_';
@@ -69,6 +78,8 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
6978\$ dolibarr_main_authentication='${DOLI_AUTH} ';
7079\$ dolibarr_main_prod=${DOLI_PROD} ;
7180EOF
81+
82+
7283 if [[ ! -z ${DOLI_INSTANCE_UNIQUE_ID} ]]; then
7384 echo " [INIT] => update Dolibarr Config with instance unique id ..."
7485 echo " \$ dolibarr_main_instance_unique_id='${DOLI_INSTANCE_UNIQUE_ID} ';" >> /var/www/html/conf/conf.php
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ FROM ${ARCH}php:7.4-apache-bullseye
77# Modified according to the GPL license by developers of the Dolibarr community:
88# 2024 Alois Micard
99# 2024 Laurent Destailleur
10+ # 2025 Renato de Castro Ferreira
1011LABEL maintainer=
"The Dolibarr foundation <[email protected] >" 1112
1213ENV DOLI_VERSION=15.0.3
@@ -18,6 +19,7 @@ ENV DOLI_DB_TYPE=mysqli
1819ENV DOLI_DB_HOST=mysql
1920ENV DOLI_DB_HOST_PORT=3306
2021ENV DOLI_DB_NAME=dolidb
22+ ENV DOLI_DB_SSL=true
2123
2224ENV DOLI_URL_ROOT='http://localhost'
2325
Original file line number Diff line number Diff line change @@ -59,7 +59,16 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
5959\$ dolibarr_main_url_root_alt='/custom';
6060\$ dolibarr_main_document_root_alt='/var/www/html/custom';
6161\$ dolibarr_main_data_root='/var/www/documents';
62- \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';
62+ EOF
63+
64+ # Check if SSL is enabled for the database
65+ if [[ " ${DOLI_DB_SSL} " == " true" && " ${DOLI_DB_TYPE} " == " mysqli" ]]; then
66+ echo " \$ dolibarr_main_db_host='ssl://${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
67+ else
68+ echo " \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
69+ fi
70+
71+ cat > /var/www/html/conf/conf.php << EOF
6372\$ dolibarr_main_db_port='${DOLI_DB_HOST_PORT} ';
6473\$ dolibarr_main_db_name='${DOLI_DB_NAME} ';
6574\$ dolibarr_main_db_prefix='llx_';
@@ -69,6 +78,8 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
6978\$ dolibarr_main_authentication='${DOLI_AUTH} ';
7079\$ dolibarr_main_prod=${DOLI_PROD} ;
7180EOF
81+
82+
7283 if [[ ! -z ${DOLI_INSTANCE_UNIQUE_ID} ]]; then
7384 echo " [INIT] => update Dolibarr Config with instance unique id ..."
7485 echo " \$ dolibarr_main_instance_unique_id='${DOLI_INSTANCE_UNIQUE_ID} ';" >> /var/www/html/conf/conf.php
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ FROM ${ARCH}php:8.1-apache-bullseye
77# Modified according to the GPL license by developers of the Dolibarr community:
88# 2024 Alois Micard
99# 2024 Laurent Destailleur
10+ # 2025 Renato de Castro Ferreira
1011LABEL maintainer=
"The Dolibarr foundation <[email protected] >" 1112
1213ENV DOLI_VERSION=16.0.5
@@ -18,6 +19,7 @@ ENV DOLI_DB_TYPE=mysqli
1819ENV DOLI_DB_HOST=mysql
1920ENV DOLI_DB_HOST_PORT=3306
2021ENV DOLI_DB_NAME=dolidb
22+ ENV DOLI_DB_SSL=true
2123
2224ENV DOLI_URL_ROOT='http://localhost'
2325
Original file line number Diff line number Diff line change @@ -59,7 +59,16 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
5959\$ dolibarr_main_url_root_alt='/custom';
6060\$ dolibarr_main_document_root_alt='/var/www/html/custom';
6161\$ dolibarr_main_data_root='/var/www/documents';
62- \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';
62+ EOF
63+
64+ # Check if SSL is enabled for the database
65+ if [[ " ${DOLI_DB_SSL} " == " true" && " ${DOLI_DB_TYPE} " == " mysqli" ]]; then
66+ echo " \$ dolibarr_main_db_host='ssl://${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
67+ else
68+ echo " \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
69+ fi
70+
71+ cat > /var/www/html/conf/conf.php << EOF
6372\$ dolibarr_main_db_port='${DOLI_DB_HOST_PORT} ';
6473\$ dolibarr_main_db_name='${DOLI_DB_NAME} ';
6574\$ dolibarr_main_db_prefix='llx_';
@@ -69,6 +78,8 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
6978\$ dolibarr_main_authentication='${DOLI_AUTH} ';
7079\$ dolibarr_main_prod=${DOLI_PROD} ;
7180EOF
81+
82+
7283 if [[ ! -z ${DOLI_INSTANCE_UNIQUE_ID} ]]; then
7384 echo " [INIT] => update Dolibarr Config with instance unique id ..."
7485 echo " \$ dolibarr_main_instance_unique_id='${DOLI_INSTANCE_UNIQUE_ID} ';" >> /var/www/html/conf/conf.php
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ FROM ${ARCH}php:8.1-apache-bullseye
77# Modified according to the GPL license by developers of the Dolibarr community:
88# 2024 Alois Micard
99# 2024 Laurent Destailleur
10+ # 2025 Renato de Castro Ferreira
1011LABEL maintainer=
"The Dolibarr foundation <[email protected] >" 1112
1213ENV DOLI_VERSION=17.0.4
@@ -18,6 +19,7 @@ ENV DOLI_DB_TYPE=mysqli
1819ENV DOLI_DB_HOST=mysql
1920ENV DOLI_DB_HOST_PORT=3306
2021ENV DOLI_DB_NAME=dolidb
22+ ENV DOLI_DB_SSL=true
2123
2224ENV DOLI_URL_ROOT='http://localhost'
2325
Original file line number Diff line number Diff line change @@ -59,7 +59,16 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
5959\$ dolibarr_main_url_root_alt='/custom';
6060\$ dolibarr_main_document_root_alt='/var/www/html/custom';
6161\$ dolibarr_main_data_root='/var/www/documents';
62- \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';
62+ EOF
63+
64+ # Check if SSL is enabled for the database
65+ if [[ " ${DOLI_DB_SSL} " == " true" && " ${DOLI_DB_TYPE} " == " mysqli" ]]; then
66+ echo " \$ dolibarr_main_db_host='ssl://${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
67+ else
68+ echo " \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
69+ fi
70+
71+ cat > /var/www/html/conf/conf.php << EOF
6372\$ dolibarr_main_db_port='${DOLI_DB_HOST_PORT} ';
6473\$ dolibarr_main_db_name='${DOLI_DB_NAME} ';
6574\$ dolibarr_main_db_prefix='llx_';
@@ -69,6 +78,8 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
6978\$ dolibarr_main_authentication='${DOLI_AUTH} ';
7079\$ dolibarr_main_prod=${DOLI_PROD} ;
7180EOF
81+
82+
7283 if [[ ! -z ${DOLI_INSTANCE_UNIQUE_ID} ]]; then
7384 echo " [INIT] => update Dolibarr Config with instance unique id ..."
7485 echo " \$ dolibarr_main_instance_unique_id='${DOLI_INSTANCE_UNIQUE_ID} ';" >> /var/www/html/conf/conf.php
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ FROM ${ARCH}php:8.1-apache-bullseye
77# Modified according to the GPL license by developers of the Dolibarr community:
88# 2024 Alois Micard
99# 2024 Laurent Destailleur
10+ # 2025 Renato de Castro Ferreira
1011LABEL maintainer=
"The Dolibarr foundation <[email protected] >" 1112
1213ENV DOLI_VERSION=18.0.6
@@ -18,6 +19,7 @@ ENV DOLI_DB_TYPE=mysqli
1819ENV DOLI_DB_HOST=mysql
1920ENV DOLI_DB_HOST_PORT=3306
2021ENV DOLI_DB_NAME=dolidb
22+ ENV DOLI_DB_SSL=true
2123
2224ENV DOLI_URL_ROOT='http://localhost'
2325
Original file line number Diff line number Diff line change @@ -59,7 +59,16 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
5959\$ dolibarr_main_url_root_alt='/custom';
6060\$ dolibarr_main_document_root_alt='/var/www/html/custom';
6161\$ dolibarr_main_data_root='/var/www/documents';
62- \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';
62+ EOF
63+
64+ # Check if SSL is enabled for the database
65+ if [[ " ${DOLI_DB_SSL} " == " true" && " ${DOLI_DB_TYPE} " == " mysqli" ]]; then
66+ echo " \$ dolibarr_main_db_host='ssl://${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
67+ else
68+ echo " \$ dolibarr_main_db_host='${DOLI_DB_HOST} ';" >> /var/www/html/conf/conf.php
69+ fi
70+
71+ cat > /var/www/html/conf/conf.php << EOF
6372\$ dolibarr_main_db_port='${DOLI_DB_HOST_PORT} ';
6473\$ dolibarr_main_db_name='${DOLI_DB_NAME} ';
6574\$ dolibarr_main_db_prefix='llx_';
@@ -69,6 +78,8 @@ if [[ ! -f /var/www/html/conf/conf.php ]]; then
6978\$ dolibarr_main_authentication='${DOLI_AUTH} ';
7079\$ dolibarr_main_prod=${DOLI_PROD} ;
7180EOF
81+
82+
7283 if [[ ! -z ${DOLI_INSTANCE_UNIQUE_ID} ]]; then
7384 echo " [INIT] => update Dolibarr Config with instance unique id ..."
7485 echo " \$ dolibarr_main_instance_unique_id='${DOLI_INSTANCE_UNIQUE_ID} ';" >> /var/www/html/conf/conf.php
You can’t perform that action at this time.
0 commit comments