Ajout des options --apache et --frankenphp pour le script de construction de l'image.
This commit is contained in:
@@ -13,6 +13,9 @@ serverVersion=""
|
||||
serverName=""
|
||||
withDebug=false
|
||||
withBuild=false
|
||||
withApacheOption=false
|
||||
withFrankenphpOption=false
|
||||
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
@@ -22,9 +25,32 @@ for arg in "$@"; do
|
||||
--build)
|
||||
withBuild=true
|
||||
;;
|
||||
--apache)
|
||||
withApacheOption=true
|
||||
;;
|
||||
--frankenphp)
|
||||
withFrankenphpOption=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Traitement des options --apache et --frankenphp
|
||||
if [[ "$withApacheOption" == "true" ]]; then
|
||||
if [[ "$APACHE_PHP_IMAGE" == "" ]]; then
|
||||
echo "La variable d'environnement APACHE_PHP_IMAGE n'est pas définie."
|
||||
exit 1
|
||||
else
|
||||
SERVER_PHP_IMAGE=$APACHE_PHP_IMAGE
|
||||
fi
|
||||
elif [[ "$withFrankenphpOption" == "true" ]]; then
|
||||
if [[ "$FRANKENPHP_IMAGE" == "" ]]; then
|
||||
echo "La variable d'environnement FRANKENPHP_IMAGE n'est pas définie."
|
||||
exit 1
|
||||
else
|
||||
SERVER_PHP_IMAGE=$FRANKENPHP_IMAGE
|
||||
fi
|
||||
fi
|
||||
|
||||
# Vérifie que le repository de l'image est définie
|
||||
if [[ "$SERVER_IMAGE_REPOSITORY" == "" ]]; then
|
||||
echo "Le repository de l'image est inconnu. Veuillez définir la variable d'environnement SERVER_IMAGE_REPOSITORY."
|
||||
|
||||
Reference in New Issue
Block a user