Skip to content

Commit

Permalink
Update email for feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 13, 2024
1 parent 514caf7 commit c97f91a
Show file tree
Hide file tree
Showing 17 changed files with 77 additions and 34 deletions.
5 changes: 4 additions & 1 deletion Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ ARG ARCH=
# Use an image like PHP_BASE_IMAGE=x.y-apache-buster
FROM ${ARCH}php:%PHP_BASE_IMAGE%

LABEL maintainer="Garcia MICHEL <[email protected]>"
# Credit/Initial maintainer: Garcia MICHEL <[email protected]>
#LABEL maintainer="Garcia MICHEL <[email protected]>"
LABEL maintainer="The Dolibarr foundation <[email protected]>"

ENV DOLI_VERSION %DOLI_VERSION%
ENV DOLI_VERSION_FOR_INIT_DEMO %DOLI_VERSION_FOR_INIT_DEMO%
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_PROD 1

Expand Down
12 changes: 8 additions & 4 deletions docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@ function initializeDatabase()
mkdir -p /var/www/dev/initdemo/

echo "DOLI_VERSION=$DOLI_VERSION"
# Convert version x.y into x.y.0

# Set DOLI_VERSION to a number "x.y", even if value is "develop"
if [ ${DOLI_VERSION} == "develop" ]; then
echo "DOLI_VERSION is develop, we will use the file for version %DOLIBARR_VERSION_FOR_INIT_DEMO%"
DOLI_VERSION="%DOLIBARR_VERSION_FOR_INIT_DEMO%"
echo "DOLI_VERSION is develop, we will use the github source files for version $DOLI_VERSION_FOR_INIT_DEMO"
DOLI_VERSION="$DOLI_VERSION_FOR_INIT_DEMO"
fi
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y into x.y.0

# Convert version x.y.z into x.y.0
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y.z into x.y.0

echo "Get demo data with: curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql"
curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql
if [ $? -ne 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions images/15.0.3-php7.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM ${ARCH}php:7.4-apache-buster
LABEL maintainer="Garcia MICHEL <[email protected]>"

ENV DOLI_VERSION 15.0.3
ENV DOLI_VERSION_FOR_INIT_DEMO 15.0
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_PROD 1

Expand Down
12 changes: 8 additions & 4 deletions images/15.0.3-php7.4/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@ function initializeDatabase()
mkdir -p /var/www/dev/initdemo/

echo "DOLI_VERSION=$DOLI_VERSION"
# Convert version x.y into x.y.0

# Set DOLI_VERSION to a number "x.y", even if value is "develop"
if [ ${DOLI_VERSION} == "develop" ]; then
echo "DOLI_VERSION is develop, we will use the file for version %DOLIBARR_VERSION_FOR_INIT_DEMO%"
DOLI_VERSION="%DOLIBARR_VERSION_FOR_INIT_DEMO%"
echo "DOLI_VERSION is develop, we will use the github source files for version $DOLI_VERSION_FOR_INIT_DEMO"
DOLI_VERSION="$DOLI_VERSION_FOR_INIT_DEMO"
fi
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y into x.y.0

# Convert version x.y.z into x.y.0
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y.z into x.y.0

echo "Get demo data with: curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql"
curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql
if [ $? -ne 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions images/16.0.5-php8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM ${ARCH}php:8.1-apache-buster
LABEL maintainer="Garcia MICHEL <[email protected]>"

ENV DOLI_VERSION 16.0.5
ENV DOLI_VERSION_FOR_INIT_DEMO 16.0
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_PROD 1

Expand Down
12 changes: 8 additions & 4 deletions images/16.0.5-php8.1/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@ function initializeDatabase()
mkdir -p /var/www/dev/initdemo/

echo "DOLI_VERSION=$DOLI_VERSION"
# Convert version x.y into x.y.0

# Set DOLI_VERSION to a number "x.y", even if value is "develop"
if [ ${DOLI_VERSION} == "develop" ]; then
echo "DOLI_VERSION is develop, we will use the file for version %DOLIBARR_VERSION_FOR_INIT_DEMO%"
DOLI_VERSION="%DOLIBARR_VERSION_FOR_INIT_DEMO%"
echo "DOLI_VERSION is develop, we will use the github source files for version $DOLI_VERSION_FOR_INIT_DEMO"
DOLI_VERSION="$DOLI_VERSION_FOR_INIT_DEMO"
fi
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y into x.y.0

# Convert version x.y.z into x.y.0
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y.z into x.y.0

echo "Get demo data with: curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql"
curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql
if [ $? -ne 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions images/17.0.4-php8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM ${ARCH}php:8.1-apache-buster
LABEL maintainer="Garcia MICHEL <[email protected]>"

ENV DOLI_VERSION 17.0.4
ENV DOLI_VERSION_FOR_INIT_DEMO 17.0
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_PROD 1

Expand Down
12 changes: 8 additions & 4 deletions images/17.0.4-php8.1/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@ function initializeDatabase()
mkdir -p /var/www/dev/initdemo/

echo "DOLI_VERSION=$DOLI_VERSION"
# Convert version x.y into x.y.0

# Set DOLI_VERSION to a number "x.y", even if value is "develop"
if [ ${DOLI_VERSION} == "develop" ]; then
echo "DOLI_VERSION is develop, we will use the file for version %DOLIBARR_VERSION_FOR_INIT_DEMO%"
DOLI_VERSION="%DOLIBARR_VERSION_FOR_INIT_DEMO%"
echo "DOLI_VERSION is develop, we will use the github source files for version $DOLI_VERSION_FOR_INIT_DEMO"
DOLI_VERSION="$DOLI_VERSION_FOR_INIT_DEMO"
fi
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y into x.y.0

# Convert version x.y.z into x.y.0
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y.z into x.y.0

echo "Get demo data with: curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql"
curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql
if [ $? -ne 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions images/18.0.5-php8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM ${ARCH}php:8.1-apache-buster
LABEL maintainer="Garcia MICHEL <[email protected]>"

ENV DOLI_VERSION 18.0.5
ENV DOLI_VERSION_FOR_INIT_DEMO 18.0
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_PROD 1

Expand Down
12 changes: 8 additions & 4 deletions images/18.0.5-php8.1/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@ function initializeDatabase()
mkdir -p /var/www/dev/initdemo/

echo "DOLI_VERSION=$DOLI_VERSION"
# Convert version x.y into x.y.0

# Set DOLI_VERSION to a number "x.y", even if value is "develop"
if [ ${DOLI_VERSION} == "develop" ]; then
echo "DOLI_VERSION is develop, we will use the file for version %DOLIBARR_VERSION_FOR_INIT_DEMO%"
DOLI_VERSION="%DOLIBARR_VERSION_FOR_INIT_DEMO%"
echo "DOLI_VERSION is develop, we will use the github source files for version $DOLI_VERSION_FOR_INIT_DEMO"
DOLI_VERSION="$DOLI_VERSION_FOR_INIT_DEMO"
fi
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y into x.y.0

# Convert version x.y.z into x.y.0
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y.z into x.y.0

echo "Get demo data with: curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql"
curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql
if [ $? -ne 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions images/19.0.3-php8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM ${ARCH}php:8.2-apache-buster
LABEL maintainer="Garcia MICHEL <[email protected]>"

ENV DOLI_VERSION 19.0.3
ENV DOLI_VERSION_FOR_INIT_DEMO 19.0
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_PROD 1

Expand Down
12 changes: 8 additions & 4 deletions images/19.0.3-php8.2/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@ function initializeDatabase()
mkdir -p /var/www/dev/initdemo/

echo "DOLI_VERSION=$DOLI_VERSION"
# Convert version x.y into x.y.0

# Set DOLI_VERSION to a number "x.y", even if value is "develop"
if [ ${DOLI_VERSION} == "develop" ]; then
echo "DOLI_VERSION is develop, we will use the file for version %DOLIBARR_VERSION_FOR_INIT_DEMO%"
DOLI_VERSION="%DOLIBARR_VERSION_FOR_INIT_DEMO%"
echo "DOLI_VERSION is develop, we will use the github source files for version $DOLI_VERSION_FOR_INIT_DEMO"
DOLI_VERSION="$DOLI_VERSION_FOR_INIT_DEMO"
fi
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y into x.y.0

# Convert version x.y.z into x.y.0
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y.z into x.y.0

echo "Get demo data with: curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql"
curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql
if [ $? -ne 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions images/develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM ${ARCH}php:8.2-apache-buster
LABEL maintainer="Garcia MICHEL <[email protected]>"

ENV DOLI_VERSION develop
ENV DOLI_VERSION_FOR_INIT_DEMO develop
ENV DOLI_INSTALL_AUTO 1
ENV DOLI_PROD 1

Expand Down
12 changes: 8 additions & 4 deletions images/develop/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@ function initializeDatabase()
mkdir -p /var/www/dev/initdemo/

echo "DOLI_VERSION=$DOLI_VERSION"
# Convert version x.y into x.y.0

# Set DOLI_VERSION to a number "x.y", even if value is "develop"
if [ ${DOLI_VERSION} == "develop" ]; then
echo "DOLI_VERSION is develop, we will use the file for version %DOLIBARR_VERSION_FOR_INIT_DEMO%"
DOLI_VERSION="%DOLIBARR_VERSION_FOR_INIT_DEMO%"
echo "DOLI_VERSION is develop, we will use the github source files for version $DOLI_VERSION_FOR_INIT_DEMO"
DOLI_VERSION="$DOLI_VERSION_FOR_INIT_DEMO"
fi
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y into x.y.0

# Convert version x.y.z into x.y.0
versiondemo=`echo "${DOLI_VERSION}" | sed "s/^\([0-9]*\.[0-9]*\).*/\1.0/"` # Convert vesion x.y.z into x.y.0

echo "Get demo data with: curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql"
curl -fLSs -o /var/www/dev/initdemo/initdemo.sql https://raw.githubusercontent.com/Dolibarr/dolibarr/${DOLI_VERSION}/dev/initdemo/mysqldump_dolibarr_$versiondemo.sql
if [ $? -ne 0 ]; then
Expand Down
4 changes: 2 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ if [ "${PHP_VER}" = "" ]; then
echo " - PHP most recent"
echo "Building image ..."
echo "DOLI_VERSION=${DOLI_VER} PHP_VERSION='' $dockerComposeBin -f '${BASE_DIR}/docker-compose.yml' [down|...]"
DOLI_VERSION=${DOLI_VER} PHP_VERSION="" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" down 1>/dev/null 2>/dev/null
DOLI_VERSION=${DOLI_VER} PHP_VERSION="" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" down 1>/dev/null
DOLI_VERSION=${DOLI_VER} PHP_VERSION="" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" build web
DOLI_VERSION=${DOLI_VER} PHP_VERSION="" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" up --force-recreate web cron
DOLI_VERSION=${DOLI_VER} PHP_VERSION="" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" down
else
echo " - PHP ${PHP_VER}"
echo "Building image ..."
DOLI_VERSION=${DOLI_VER} PHP_VERSION="-php${PHP_VER}" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" down 1> /dev/null
DOLI_VERSION=${DOLI_VER} PHP_VERSION="-php${PHP_VER}" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" down 1>/dev/null
DOLI_VERSION=${DOLI_VER} PHP_VERSION="-php${PHP_VER}" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" build web
DOLI_VERSION=${DOLI_VER} PHP_VERSION="-php${PHP_VER}" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" up --force-recreate web cron
DOLI_VERSION=${DOLI_VER} PHP_VERSION="-php${PHP_VER}" $dockerComposeBin -f "${BASE_DIR}/docker-compose.yml" down
Expand Down
9 changes: 7 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ for dolibarrVersion in "${DOLIBARR_VERSIONS[@]}"; do
tags="${tags}\n\*"
dolibarrMajor=$(echo ${dolibarrVersion} | cut -d. -f1)

# Mapping version according https://wiki.dolibarr.org/index.php/Versions
# Mapping PHP version according Dolibarr version (See https://wiki.dolibarr.org/index.php/Versions)
# Regarding PHP Supported version : https://www.php.net/supported-versions.php
if [ "${dolibarrVersion}" = "develop" ] || [ "${dolibarrMajor}" -ge "19" ] || [ "${dolibarrMajor}" -ge "20" ]; then
php_base_images=( "8.2-apache-buster" )
Expand Down Expand Up @@ -63,10 +63,15 @@ for dolibarrVersion in "${DOLIBARR_VERSIONS[@]}"; do

dir="${BASE_DIR}/images/${currentTag}"

# Set DOLIBARR_VERSION_FOR_INIT_DEMO to x.y version
if [ ${dolibarrVersion} != "dolibarr" ]; then
DOLIBARR_VERSION_FOR_INIT_DEMO=$(echo "${dolibarrVersion}" | sed 's/\(\.[^\.]*\)\.[^\.]*$/\1/')
fi

mkdir -p "${dir}"
sed 's/%PHP_BASE_IMAGE%/'"${php_base_image}"'/;' "${BASE_DIR}/Dockerfile.template" | \
sed 's/%DOLI_VERSION%/'"${dolibarrVersion}"'/;' | \
sed 's/%DOLIBARR_VERSION_FOR_INIT_DEMO%/'"${DOLIBARR_VERSION_FOR_INIT_DEMO}"'/;' \
sed 's/%DOLI_VERSION_FOR_INIT_DEMO%/'"${DOLIBARR_VERSION_FOR_INIT_DEMO}"'/;' \
> "${dir}/Dockerfile"

cp -a "${BASE_DIR}/docker-init.php" "${dir}/docker-init.php"
Expand Down
3 changes: 2 additions & 1 deletion versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ DOLIBARR_VERSIONS=("15.0.3" "16.0.5" "17.0.4" "18.0.5" "19.0.3" "develop")
# The version to use when installing dolibarr/dolibarr:latest
DOLIBARR_LATEST_TAG="19.0.3"

# The version to use to find the dump file for init of demo
# The version to use to find the dump file for the init of demo with branch "develop"
DOLIBARR_VERSION_FOR_INIT_DEMO="20.0"

0 comments on commit c97f91a

Please sign in to comment.