From 95954b6d5e33827df41baacb8951b50d281bc41c Mon Sep 17 00:00:00 2001 From: freechelmi Date: Mon, 11 Oct 2021 23:30:11 +0200 Subject: [PATCH 01/10] WIP : direct apache --- docker-compose.yml | 39 +++++++++++++++++++++++++++++++++++++++ scripts/install | 30 ++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 docker-compose.yml create mode 100755 scripts/install diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..354db79 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,39 @@ +version: '2.3' +networks: + lb_web: + external: true + back: + driver: bridge + ipam: + driver: default + config: + - subnet: 10.0.${SUBNET}.0/24 +services: + db: + image: mariadb:${MARIADB_VERSION:-10.6} + volumes: + - ./db/mysql/runtime:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD + - MYSQL_DATABASE=dolibarr + networks: + - back + app: + image: tuxgasy/dolibarr:${DOLI_VERSION} + links: + - db + volumes: + - ./data/dolibarr-docs:/var/www/documents + environment: + - DOLI_DB_HOST=db + - DOLI_DB_USER=root + - DOLI_DB_PASSWORD + - DOLI_DB_NAME=dolibarr + - DOLI_ADMIN_LOGIN + - DOLI_ADMIN_PASSWORD + - DOLI_URL_ROOT=https://doli.ekimia.fr + - PHP_INI_DATE_TIMEZONE='Europe/Paris' + - VIRTUAL_HOST + networks: + - back + - lb_web \ No newline at end of file diff --git a/scripts/install b/scripts/install new file mode 100755 index 0000000..0622667 --- /dev/null +++ b/scripts/install @@ -0,0 +1,30 @@ +#!/bin/bash -eux + +source /etc/environment + + +DOLI_VERSION=14 +MYSQL_ROOT_PASSWORD=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs` + +var=$(for folder in `ls /data/domains`; do cat /data/domains/$folder/.env | grep SUBNET | cut -d"=" -f2; done | sort | tail -n1) +SUBNET=$(($var +1)) +DOLI_ADMIN_LOGIN=admin +DOLI_ADMIN_PASSWORD=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs` + + + +echo "MARIADB_VERSION=10.6" >> .env +echo "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" > .env +echo "DOLI_DB_PASSWORD=${MYSQL_ROOT_PASSWORD}" >> .env + +echo "MAIL_PASS=${MAIL_PASS}" >> .env +echo "MAIL_USER=${MAIL_USER}" >> .env +echo "MAIL_HOST=${MAIL_HOST}" >> .env +echo "MAIL_PORT=${MAIL_PORT}" >> .env +echo "MAIL_SECURITY=tls" >> .env + +echo "SUBNET=${SUBNET}" >> .env + +echo "DOLI_ADMIN_LOGIN=${DOLI_ADMIN_LOGIN}" >> .env +echo "DOLI_ADMIN_PASSWORD=${DOLI_ADMIN_PASSWORD}" >> .env +echo "DOLI_VERSION=${DOLI_VERSION}" >> .env -- GitLab From 386ee6ce572e49a39ecaa71144a3d13cb8c6eb76 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Mon, 18 Oct 2021 10:19:41 +0200 Subject: [PATCH 02/10] Try to use URL --- docker-compose.yml | 4 ++-- scripts/install | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 354db79..b74cedb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,9 +31,9 @@ services: - DOLI_DB_NAME=dolibarr - DOLI_ADMIN_LOGIN - DOLI_ADMIN_PASSWORD - - DOLI_URL_ROOT=https://doli.ekimia.fr + - DOLI_URL_ROOT=https://${URL} - PHP_INI_DATE_TIMEZONE='Europe/Paris' - VIRTUAL_HOST networks: - back - - lb_web \ No newline at end of file + - lb_web diff --git a/scripts/install b/scripts/install index 0622667..449c16d 100755 --- a/scripts/install +++ b/scripts/install @@ -11,7 +11,7 @@ SUBNET=$(($var +1)) DOLI_ADMIN_LOGIN=admin DOLI_ADMIN_PASSWORD=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs` - +echo "URL=${URL}" >> .env echo "MARIADB_VERSION=10.6" >> .env echo "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" > .env -- GitLab From 02ab821969528e22ff770e832c1228eadb38180c Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Mon, 1 Nov 2021 16:45:17 +0100 Subject: [PATCH 03/10] [WIP] Use the new libresh image --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b74cedb..1dce837 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,11 +19,12 @@ services: networks: - back app: - image: tuxgasy/dolibarr:${DOLI_VERSION} + image: libresh/dolibarr:${DOLI_VERSION} links: - db volumes: - ./data/dolibarr-docs:/var/www/documents + - ./data/dolibarr-htdocs:/var/www/html environment: - DOLI_DB_HOST=db - DOLI_DB_USER=root -- GitLab From e0c607927618e517392b0e1fcd0f32be40688f27 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Mon, 1 Nov 2021 16:48:41 +0100 Subject: [PATCH 04/10] Version 14.0.2 --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 449c16d..a029237 100755 --- a/scripts/install +++ b/scripts/install @@ -3,7 +3,7 @@ source /etc/environment -DOLI_VERSION=14 +DOLI_VERSION=14.0.2 MYSQL_ROOT_PASSWORD=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs` var=$(for folder in `ls /data/domains`; do cat /data/domains/$folder/.env | grep SUBNET | cut -d"=" -f2; done | sort | tail -n1) -- GitLab From 711d208d79e3f1e4583cd4c539996685430f9d9f Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Mon, 1 Nov 2021 21:50:38 +0100 Subject: [PATCH 05/10] Need to use a named volume for now for /var/www/html --- docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1dce837..2f74c2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: - db volumes: - ./data/dolibarr-docs:/var/www/documents - - ./data/dolibarr-htdocs:/var/www/html + - doli-html:/var/www/html environment: - DOLI_DB_HOST=db - DOLI_DB_USER=root @@ -38,3 +38,5 @@ services: networks: - back - lb_web +volumes: + doli-html: -- GitLab From d0f7b90c0b2f9a675aa71d3411c3925171320d52 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Mon, 1 Nov 2021 23:03:04 +0100 Subject: [PATCH 06/10] Fix missing values --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index a029237..0182378 100755 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,7 @@ DOLI_ADMIN_PASSWORD=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs` echo "URL=${URL}" >> .env echo "MARIADB_VERSION=10.6" >> .env -echo "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" > .env +echo "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" >> .env echo "DOLI_DB_PASSWORD=${MYSQL_ROOT_PASSWORD}" >> .env echo "MAIL_PASS=${MAIL_PASS}" >> .env -- GitLab From 294df52f487e19af61b2b201789eae206e8bd3f8 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Thu, 7 Apr 2022 15:24:05 +0200 Subject: [PATCH 07/10] Increase upload php params --- custom.ini | 2 ++ docker-compose.yml | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 custom.ini diff --git a/custom.ini b/custom.ini new file mode 100644 index 0000000..7e3a09e --- /dev/null +++ b/custom.ini @@ -0,0 +1,2 @@ +upload_max_filesize = 20M +post_max_size = 40M diff --git a/docker-compose.yml b/docker-compose.yml index 2f74c2f..1c9e138 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,8 @@ services: volumes: - ./data/dolibarr-docs:/var/www/documents - doli-html:/var/www/html + - ./custom.ini:/usr/local/etc/php/conf.d/custom.ini + environment: - DOLI_DB_HOST=db - DOLI_DB_USER=root -- GitLab From aa20efde9bc670053ef4dcb097c85f23c727ceff Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Thu, 7 Apr 2022 15:24:31 +0200 Subject: [PATCH 08/10] Don't assume security smtp type --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 0182378..52f52b3 100755 --- a/scripts/install +++ b/scripts/install @@ -3,7 +3,7 @@ source /etc/environment -DOLI_VERSION=14.0.2 +DOLI_VERSION=14.0.5 MYSQL_ROOT_PASSWORD=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs` var=$(for folder in `ls /data/domains`; do cat /data/domains/$folder/.env | grep SUBNET | cut -d"=" -f2; done | sort | tail -n1) @@ -21,7 +21,7 @@ echo "MAIL_PASS=${MAIL_PASS}" >> .env echo "MAIL_USER=${MAIL_USER}" >> .env echo "MAIL_HOST=${MAIL_HOST}" >> .env echo "MAIL_PORT=${MAIL_PORT}" >> .env -echo "MAIL_SECURITY=tls" >> .env +echo "MAIL_SECURITY=${MAIL_SECURITY}" >> .env echo "SUBNET=${SUBNET}" >> .env -- GitLab From 2bd1d8d89b6f77c36ae6bcb4b278e9a65aa74dd4 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Fri, 9 Sep 2022 09:12:02 +0000 Subject: [PATCH 09/10] Don't volume www --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1c9e138..133ef8b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,6 @@ services: - db volumes: - ./data/dolibarr-docs:/var/www/documents - - doli-html:/var/www/html - ./custom.ini:/usr/local/etc/php/conf.d/custom.ini environment: -- GitLab From 16ae46f12bbd632021098fdc2ff4394071c04ed1 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Fri, 9 Sep 2022 09:13:06 +0000 Subject: [PATCH 10/10] DOLI_VERSION=15.0.3 --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 52f52b3..0116886 100755 --- a/scripts/install +++ b/scripts/install @@ -3,7 +3,7 @@ source /etc/environment -DOLI_VERSION=14.0.5 +DOLI_VERSION=15.0.3 MYSQL_ROOT_PASSWORD=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs` var=$(for folder in `ls /data/domains`; do cat /data/domains/$folder/.env | grep SUBNET | cut -d"=" -f2; done | sort | tail -n1) -- GitLab