More code comment. Rename /home/dolibarr_data into
/home/dolibarr_documents
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
# Contributing
|
||||
1. Create only head Dolibarr version for each Major release in file `versions.sh`.
|
||||
|
||||
1. List one head Dolibarr version for each Major release in the file `versions.sh`.
|
||||
2. Keep only one Dockerfile.template file, use `sed` value replacement in `update.sh`
|
||||
3. Keep most up to date PHP version that matches each [Dolibarr releases](https://wiki.dolibarr.org/index.php/Versions).
|
||||
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.
|
||||
5. Run the `update.sh` script
|
||||
6. check the `README.md`, to ensure it is well formatted (on some environment `Supported Tags` could be broken)
|
||||
5. Run the `update.sh` script to generate all the files rquired to build each Docker images.
|
||||
6. Check the `README.md`, to ensure it is well formatted (on some environment `Supported Tags` could be broken)
|
||||
7. Commit all content in `images` directory
|
||||
8. Open a pull request with a polite and well described content ^_^
|
||||
|
||||
|
||||
# How to create images
|
||||
All is done through the `update.sh` script, Dolibarr version to build are stored in `versions.sh`
|
||||
|
||||
All is done through the `update.sh` script, Dolibarr versions to build are stored in `versions.sh`
|
||||
Ensure that the var `DOLIBARR_VERSIONS` in `versions.sh` is having all versions you want to build.
|
||||
Run the script.
|
||||
Just run the script update.sh.
|
||||
|
||||
## Tips
|
||||
You can ask the script to build and push version for you: just add `DOCKER_BUILD=1` and `DOCKER_PUSH=1` in command line.
|
||||
@@ -19,21 +22,28 @@ You can ask the script to build and push version for you: just add `DOCKER_BUILD
|
||||
$> DOCKER_BUILD=1 DOCKER_PUSH=1 ./update.sh
|
||||
```
|
||||
|
||||
|
||||
# Test your local copy before PR
|
||||
|
||||
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)
|
||||
```bash
|
||||
$> ./test.sh <DOLIBARR_VERSION> <PHP_VERSION>
|
||||
$> sudo ./test.sh <DOLIBARR_VERSION> <PHP_VERSION>
|
||||
```
|
||||
* DOLIBARR_VERSION : (Mandatory) the version you want to build and run.
|
||||
* 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.
|
||||
|
||||
If you want to run Dolibarr 14.0.3 with PHP 7.4
|
||||
```bash
|
||||
$> ./test.sh 14.0.3 7.4
|
||||
$> sudo ./test.sh 14.0.3 7.4
|
||||
```
|
||||
If you want to run Dolibarr 14.0.3 with most up-to-date PHP version
|
||||
```bash
|
||||
$> ./test.sh 14.0.3
|
||||
$> sudo ./test.sh 14.0.3
|
||||
```
|
||||
|
||||
If you want to run Dolibarr develop with most up-to-date PHP version
|
||||
```bash
|
||||
$> sudo ./test.sh develop
|
||||
```
|
||||
|
||||
Here are links for running containers :
|
||||
|
||||
@@ -35,9 +35,9 @@ using the tools saved in the [Dolibarr docker build repository](https://github.c
|
||||
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):
|
||||
|
||||
If you want to have a persistent database and dolibarr data files after reboot or upgrade, you must first
|
||||
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.
|
||||
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.
|
||||
|
||||
`mkdir /home/mariadb_data /home/dolibarr_data /home/dolibarr_custom;`
|
||||
`mkdir /home/mariadb_data /home/dolibarr_documents /home/dolibarr_custom;`
|
||||
|
||||
Then, create a `docker-compose.yml` file as following:
|
||||
|
||||
@@ -61,13 +61,13 @@ services:
|
||||
DOLI_URL_ROOT: 'http://0.0.0.0'
|
||||
DOLI_ADMIN_LOGIN: 'admin'
|
||||
DOLI_ADMIN_PASSWORD: 'admin'
|
||||
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
|
||||
DOLI_INIT_DEMO: 0
|
||||
ports:
|
||||
- "80:80"
|
||||
links:
|
||||
- mariadb
|
||||
volumes:
|
||||
- /home/dolibarr_data:/var/www/documents
|
||||
- /home/dolibarr_documents:/var/www/documents
|
||||
- /home/dolibarr_custom:/var/www/html/custom
|
||||
```
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ using the tools saved in the [Dolibarr docker build repository](https://github.c
|
||||
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):
|
||||
|
||||
If you want to have a persistent database and dolibarr data files after reboot or upgrade, you must first
|
||||
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.
|
||||
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.
|
||||
|
||||
`mkdir /home/mariadb_data /home/dolibarr_data /home/dolibarr_custom;`
|
||||
`mkdir /home/mariadb_data /home/dolibarr_documents /home/dolibarr_custom;`
|
||||
|
||||
Then, create a `docker-compose.yml` file as following:
|
||||
|
||||
@@ -55,13 +55,13 @@ services:
|
||||
DOLI_URL_ROOT: 'http://0.0.0.0'
|
||||
DOLI_ADMIN_LOGIN: 'admin'
|
||||
DOLI_ADMIN_PASSWORD: 'admin'
|
||||
PHP_INI_DATE_TIMEZONE: 'Europe/Paris'
|
||||
DOLI_INIT_DEMO: 0
|
||||
ports:
|
||||
- "80:80"
|
||||
links:
|
||||
- mariadb
|
||||
volumes:
|
||||
- /home/dolibarr_data:/var/www/documents
|
||||
- /home/dolibarr_documents:/var/www/documents
|
||||
- /home/dolibarr_custom:/var/www/html/custom
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
require_once '../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
@@ -32,9 +35,9 @@ if (!empty(getenv('DOLI_ENABLE_MODULES'))) {
|
||||
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
|
||||
foreach ($mods as $mod) {
|
||||
printf("Activating module ".$mod." ...");
|
||||
try {
|
||||
try {
|
||||
$res = activateModule('mod' . $mod);
|
||||
if ($res < 0) {
|
||||
if ($res < 0) {
|
||||
print(" FAILED. Unable to load module. Be sure to check the case\n");
|
||||
} else {
|
||||
printf(" OK\n");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This script is run when the Docker web container is started.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
#
|
||||
|
||||
# usage: get_env_value VAR [DEFAULT]
|
||||
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
require_once '../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
@@ -32,9 +35,9 @@ if (!empty(getenv('DOLI_ENABLE_MODULES'))) {
|
||||
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
|
||||
foreach ($mods as $mod) {
|
||||
printf("Activating module ".$mod." ...");
|
||||
try {
|
||||
try {
|
||||
$res = activateModule('mod' . $mod);
|
||||
if ($res < 0) {
|
||||
if ($res < 0) {
|
||||
print(" FAILED. Unable to load module. Be sure to check the case\n");
|
||||
} else {
|
||||
printf(" OK\n");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This script is run when the Docker web container is started.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
#
|
||||
|
||||
# usage: get_env_value VAR [DEFAULT]
|
||||
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
require_once '../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
@@ -32,9 +35,9 @@ if (!empty(getenv('DOLI_ENABLE_MODULES'))) {
|
||||
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
|
||||
foreach ($mods as $mod) {
|
||||
printf("Activating module ".$mod." ...");
|
||||
try {
|
||||
try {
|
||||
$res = activateModule('mod' . $mod);
|
||||
if ($res < 0) {
|
||||
if ($res < 0) {
|
||||
print(" FAILED. Unable to load module. Be sure to check the case\n");
|
||||
} else {
|
||||
printf(" OK\n");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This script is run when the Docker web container is started.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
#
|
||||
|
||||
# usage: get_env_value VAR [DEFAULT]
|
||||
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
require_once '../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
@@ -32,9 +35,9 @@ if (!empty(getenv('DOLI_ENABLE_MODULES'))) {
|
||||
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
|
||||
foreach ($mods as $mod) {
|
||||
printf("Activating module ".$mod." ...");
|
||||
try {
|
||||
try {
|
||||
$res = activateModule('mod' . $mod);
|
||||
if ($res < 0) {
|
||||
if ($res < 0) {
|
||||
print(" FAILED. Unable to load module. Be sure to check the case\n");
|
||||
} else {
|
||||
printf(" OK\n");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This script is run when the Docker web container is started.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
#
|
||||
|
||||
# usage: get_env_value VAR [DEFAULT]
|
||||
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
require_once '../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
@@ -32,9 +35,9 @@ if (!empty(getenv('DOLI_ENABLE_MODULES'))) {
|
||||
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
|
||||
foreach ($mods as $mod) {
|
||||
printf("Activating module ".$mod." ...");
|
||||
try {
|
||||
try {
|
||||
$res = activateModule('mod' . $mod);
|
||||
if ($res < 0) {
|
||||
if ($res < 0) {
|
||||
print(" FAILED. Unable to load module. Be sure to check the case\n");
|
||||
} else {
|
||||
printf(" OK\n");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This script is run when the Docker web container is started.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
#
|
||||
|
||||
# usage: get_env_value VAR [DEFAULT]
|
||||
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
require_once '../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
@@ -32,9 +35,9 @@ if (!empty(getenv('DOLI_ENABLE_MODULES'))) {
|
||||
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
|
||||
foreach ($mods as $mod) {
|
||||
printf("Activating module ".$mod." ...");
|
||||
try {
|
||||
try {
|
||||
$res = activateModule('mod' . $mod);
|
||||
if ($res < 0) {
|
||||
if ($res < 0) {
|
||||
print(" FAILED. Unable to load module. Be sure to check the case\n");
|
||||
} else {
|
||||
printf(" OK\n");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This script is run when the Docker web container is started.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
#
|
||||
|
||||
# usage: get_env_value VAR [DEFAULT]
|
||||
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
# This script is called by the docker-run.sh script to enabled modules during Dolibarr first installation.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
require_once '../htdocs/master.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
@@ -32,9 +35,9 @@ if (!empty(getenv('DOLI_ENABLE_MODULES'))) {
|
||||
$mods = explode(',', getenv('DOLI_ENABLE_MODULES'));
|
||||
foreach ($mods as $mod) {
|
||||
printf("Activating module ".$mod." ...");
|
||||
try {
|
||||
try {
|
||||
$res = activateModule('mod' . $mod);
|
||||
if ($res < 0) {
|
||||
if ($res < 0) {
|
||||
print(" FAILED. Unable to load module. Be sure to check the case\n");
|
||||
} else {
|
||||
printf(" OK\n");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# This script is run when the Docker web container is started.
|
||||
# It is embedded into the Docker image of dolibarr/dolibarr.
|
||||
|
||||
#
|
||||
|
||||
# usage: get_env_value VAR [DEFAULT]
|
||||
# ie: get_env_value 'XYZ_DB_PASSWORD' 'example'
|
||||
|
||||
Reference in New Issue
Block a user