Skip to content

Commit aadadb0

Browse files
committed
More code comment. Rename /home/dolibarr_data into
/home/dolibarr_documents
1 parent 40f4d2e commit aadadb0

File tree

17 files changed

+68
-37
lines changed

17 files changed

+68
-37
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,49 @@
11
# Contributing
2-
1. Create only head Dolibarr version for each Major release in file `versions.sh`.
2+
3+
1. List one head Dolibarr version for each Major release in the file `versions.sh`.
34
2. Keep only one Dockerfile.template file, use `sed` value replacement in `update.sh`
45
3. Keep most up to date PHP version that matches each [Dolibarr releases](https://wiki.dolibarr.org/index.php/Versions).
56
4. Be careful about [supported PHP versions](https://www.php.net/supported-versions.php), try to avoid deprecated PHP version, but only if it doesn't break rule #3.
6-
5. Run the `update.sh` script
7-
6. check the `README.md`, to ensure it is well formatted (on some environment `Supported Tags` could be broken)
7+
5. Run the `update.sh` script to generate all the files rquired to build each Docker images.
8+
6. Check the `README.md`, to ensure it is well formatted (on some environment `Supported Tags` could be broken)
89
7. Commit all content in `images` directory
910
8. Open a pull request with a polite and well described content ^_^
1011

12+
1113
# How to create images
12-
All is done through the `update.sh` script, Dolibarr version to build are stored in `versions.sh`
14+
15+
All is done through the `update.sh` script, Dolibarr versions to build are stored in `versions.sh`
1316
Ensure that the var `DOLIBARR_VERSIONS` in `versions.sh` is having all versions you want to build.
14-
Run the script.
17+
Just run the script update.sh.
1518

1619
## Tips
1720
You can ask the script to build and push version for you: just add `DOCKER_BUILD=1` and `DOCKER_PUSH=1` in command line.
1821
```bash
1922
$> DOCKER_BUILD=1 DOCKER_PUSH=1 ./update.sh
2023
```
2124

25+
2226
# Test your local copy before PR
27+
2328
For convenience, you can use the `test.sh` script, it will build and run containers based on existing Dockerfile in `images` directory. (You'd better run `update.sh` before)
2429
```bash
25-
$> ./test.sh <DOLIBARR_VERSION> <PHP_VERSION>
30+
$> sudo ./test.sh <DOLIBARR_VERSION> <PHP_VERSION>
2631
```
2732
* DOLIBARR_VERSION : (Mandatory) the version you want to build and run.
2833
* PHP_VERSION : (Optional) the Dolibarr version with this PHP version you want to run specifically, if omitted it will use the most up to date PHP version.
2934

3035
If you want to run Dolibarr 14.0.3 with PHP 7.4
3136
```bash
32-
$> ./test.sh 14.0.3 7.4
37+
$> sudo ./test.sh 14.0.3 7.4
3338
```
3439
If you want to run Dolibarr 14.0.3 with most up-to-date PHP version
3540
```bash
36-
$> ./test.sh 14.0.3
41+
$> sudo ./test.sh 14.0.3
42+
```
43+
44+
If you want to run Dolibarr develop with most up-to-date PHP version
45+
```bash
46+
$> sudo ./test.sh develop
3747
```
3848

3949
Here are links for running containers :

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ using the tools saved in the [Dolibarr docker build repository](https://github.c
3535
This image does not contains database, so you need to link it with a database container. Let's use [Docker Compose](https://docs.docker.com/compose/) to integrate it with [MariaDB](https://hub.docker.com/_/mariadb/) (you can also use [MySQL](https://hub.docker.com/_/mysql/) if you prefer):
3636

3737
If you want to have a persistent database and dolibarr data files after reboot or upgrade, you must first
38-
create a directory /home/mariadb_data, /home/dolibarr_data and /home/dolibarr_custom on you host to store persistent files, respectively, of the database, of the Dolibarr document fils and of the external Dolibarr modules.
38+
create a directory `/home/mariadb_data`, `/home/dolibarr_documents` and `/home/dolibarr_custom` on your host to store persistent files, respectively, of the database, of the Dolibarr document files and of the installed external Dolibarr modules.
3939

40-
`mkdir /home/mariadb_data /home/dolibarr_data /home/dolibarr_custom;`
40+
`mkdir /home/mariadb_data /home/dolibarr_documents /home/dolibarr_custom;`
4141

4242
Then, create a `docker-compose.yml` file as following:
4343

@@ -61,13 +61,13 @@ services:
6161
DOLI_URL_ROOT: 'http://0.0.0.0'
6262
DOLI_ADMIN_LOGIN: 'admin'
6363
DOLI_ADMIN_PASSWORD: 'admin'
64-
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
64+
DOLI_INIT_DEMO: 0
6565
ports:
6666
- "80:80"
6767
links:
6868
- mariadb
6969
volumes:
70-
- /home/dolibarr_data:/var/www/documents
70+
- /home/dolibarr_documents:/var/www/documents
7171
- /home/dolibarr_custom:/var/www/html/custom
7272
```
7373

README.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ using the tools saved in the [Dolibarr docker build repository](https://github.c
2929
This image does not contains database, so you need to link it with a database container. Let's use [Docker Compose](https://docs.docker.com/compose/) to integrate it with [MariaDB](https://hub.docker.com/_/mariadb/) (you can also use [MySQL](https://hub.docker.com/_/mysql/) if you prefer):
3030

3131
If you want to have a persistent database and dolibarr data files after reboot or upgrade, you must first
32-
create a directory /home/mariadb_data, /home/dolibarr_data and /home/dolibarr_custom on you host to store persistent files, respectively, of the database, of the Dolibarr document fils and of the external Dolibarr modules.
32+
create a directory `/home/mariadb_data`, `/home/dolibarr_documents` and `/home/dolibarr_custom` on your host to store persistent files, respectively, of the database, of the Dolibarr document files and of the installed external Dolibarr modules.
3333

34-
`mkdir /home/mariadb_data /home/dolibarr_data /home/dolibarr_custom;`
34+
`mkdir /home/mariadb_data /home/dolibarr_documents /home/dolibarr_custom;`
3535

3636
Then, create a `docker-compose.yml` file as following:
3737

@@ -55,13 +55,13 @@ services:
5555
DOLI_URL_ROOT: 'http://0.0.0.0'
5656
DOLI_ADMIN_LOGIN: 'admin'
5757
DOLI_ADMIN_PASSWORD: 'admin'
58-
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
58+
DOLI_INIT_DEMO: 0
5959
ports:
6060
- "80:80"
6161
links:
6262
- mariadb
6363
volumes:
64-
- /home/dolibarr_data:/var/www/documents
64+
- /home/dolibarr_documents:/var/www/documents
6565
- /home/dolibarr_custom:/var/www/html/custom
6666
```
6767

docker-init.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env php
22
<?php
3+
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
4+
# It is embedded into the Docker image of dolibarr/dolibarr.
5+
36
require_once '../htdocs/master.inc.php';
47
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
58

@@ -32,9 +35,9 @@
3235
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
3336
foreach ($mods as $mod) {
3437
printf("Activating module ".$mod." ...");
35-
try {
38+
try {
3639
$res = activateModule('mod' . $mod);
37-
if ($res < 0) {
40+
if ($res < 0) {
3841
print(" FAILED. Unable to load module. Be sure to check the case\n");
3942
} else {
4043
printf(" OK\n");

docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# This script is run when the Docker web container is started.
33
# It is embedded into the Docker image of dolibarr/dolibarr.
4-
4+
#
55

66
# usage: get_env_value VAR [DEFAULT]
77
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'

images/15.0.3-php7.4/docker-init.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env php
22
<?php
3+
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
4+
# It is embedded into the Docker image of dolibarr/dolibarr.
5+
36
require_once '../htdocs/master.inc.php';
47
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
58

@@ -32,9 +35,9 @@
3235
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
3336
foreach ($mods as $mod) {
3437
printf("Activating module ".$mod." ...");
35-
try {
38+
try {
3639
$res = activateModule('mod' . $mod);
37-
if ($res < 0) {
40+
if ($res < 0) {
3841
print(" FAILED. Unable to load module. Be sure to check the case\n");
3942
} else {
4043
printf(" OK\n");

images/15.0.3-php7.4/docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# This script is run when the Docker web container is started.
33
# It is embedded into the Docker image of dolibarr/dolibarr.
4-
4+
#
55

66
# usage: get_env_value VAR [DEFAULT]
77
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'

images/16.0.5-php8.1/docker-init.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env php
22
<?php
3+
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
4+
# It is embedded into the Docker image of dolibarr/dolibarr.
5+
36
require_once '../htdocs/master.inc.php';
47
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
58

@@ -32,9 +35,9 @@
3235
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
3336
foreach ($mods as $mod) {
3437
printf("Activating module ".$mod." ...");
35-
try {
38+
try {
3639
$res = activateModule('mod' . $mod);
37-
if ($res < 0) {
40+
if ($res < 0) {
3841
print(" FAILED. Unable to load module. Be sure to check the case\n");
3942
} else {
4043
printf(" OK\n");

images/16.0.5-php8.1/docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# This script is run when the Docker web container is started.
33
# It is embedded into the Docker image of dolibarr/dolibarr.
4-
4+
#
55

66
# usage: get_env_value VAR [DEFAULT]
77
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'

images/17.0.4-php8.1/docker-init.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env php
22
<?php
3+
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
4+
# It is embedded into the Docker image of dolibarr/dolibarr.
5+
36
require_once '../htdocs/master.inc.php';
47
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
58

@@ -32,9 +35,9 @@
3235
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
3336
foreach ($mods as $mod) {
3437
printf("Activating module ".$mod." ...");
35-
try {
38+
try {
3639
$res = activateModule('mod' . $mod);
37-
if ($res < 0) {
40+
if ($res < 0) {
3841
print(" FAILED. Unable to load module. Be sure to check the case\n");
3942
} else {
4043
printf(" OK\n");

images/17.0.4-php8.1/docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# This script is run when the Docker web container is started.
33
# It is embedded into the Docker image of dolibarr/dolibarr.
4-
4+
#
55

66
# usage: get_env_value VAR [DEFAULT]
77
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'

images/18.0.5-php8.1/docker-init.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env php
22
<?php
3+
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
4+
# It is embedded into the Docker image of dolibarr/dolibarr.
5+
36
require_once '../htdocs/master.inc.php';
47
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
58

@@ -32,9 +35,9 @@
3235
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
3336
foreach ($mods as $mod) {
3437
printf("Activating module ".$mod." ...");
35-
try {
38+
try {
3639
$res = activateModule('mod' . $mod);
37-
if ($res < 0) {
40+
if ($res < 0) {
3841
print(" FAILED. Unable to load module. Be sure to check the case\n");
3942
} else {
4043
printf(" OK\n");

images/18.0.5-php8.1/docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# This script is run when the Docker web container is started.
33
# It is embedded into the Docker image of dolibarr/dolibarr.
4-
4+
#
55

66
# usage: get_env_value VAR [DEFAULT]
77
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'

images/19.0.3-php8.2/docker-init.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env php
22
<?php
3+
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
4+
# It is embedded into the Docker image of dolibarr/dolibarr.
5+
36
require_once '../htdocs/master.inc.php';
47
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
58

@@ -32,9 +35,9 @@
3235
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
3336
foreach ($mods as $mod) {
3437
printf("Activating module ".$mod." ...");
35-
try {
38+
try {
3639
$res = activateModule('mod' . $mod);
37-
if ($res < 0) {
40+
if ($res < 0) {
3841
print(" FAILED. Unable to load module. Be sure to check the case\n");
3942
} else {
4043
printf(" OK\n");

images/19.0.3-php8.2/docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# This script is run when the Docker web container is started.
33
# It is embedded into the Docker image of dolibarr/dolibarr.
4-
4+
#
55

66
# usage: get_env_value VAR [DEFAULT]
77
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'

images/develop/docker-init.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env php
22
<?php
3+
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
4+
# It is embedded into the Docker image of dolibarr/dolibarr.
5+
36
require_once '../htdocs/master.inc.php';
47
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
58

@@ -32,9 +35,9 @@
3235
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
3336
foreach ($mods as $mod) {
3437
printf("Activating module ".$mod." ...");
35-
try {
38+
try {
3639
$res = activateModule('mod' . $mod);
37-
if ($res < 0) {
40+
if ($res < 0) {
3841
print(" FAILED. Unable to load module. Be sure to check the case\n");
3942
} else {
4043
printf(" OK\n");

images/develop/docker-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# This script is run when the Docker web container is started.
33
# It is embedded into the Docker image of dolibarr/dolibarr.
4-
4+
#
55

66
# usage: get_env_value VAR [DEFAULT]
77
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'

0 commit comments

Comments
 (0)