Add possibility to keep pub/static folder (#252)

* Add possibility to keep pub/static folder

Signed-off-by: Zoltan Mosonyi <mosonyi@esix.hu>

* Keep setup:upgrade but use --keep-generated flag

Signed-off-by: Zoltan Mosonyi <mosonyi@esix.hu>

* 2.4.4-debian-10-r20 release

Signed-off-by: Zoltan Mosonyi <mosonyi@esix.hu>

* 2.4.4-debian-10-r21 release

Signed-off-by: Zoltan Mosonyi <mosonyi@esix.hu>

* 2.4.4-debian-10-r22 release

Signed-off-by: Zoltan Mosonyi <mosonyi@esix.hu>

* 2.4.4-debian-10-r23 release

Signed-off-by: Zoltan Mosonyi <mosonyi@esix.hu>

Co-authored-by: Bitnami Bot <containers-bot@bitnami.com>
Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
This commit is contained in:
mosonyi 2022-06-06 12:55:01 +02:00 committed by Bitnami Containers
parent 0327b5ce97
commit 4bcff3a805
3 changed files with 9 additions and 3 deletions

View File

@ -355,8 +355,12 @@ magento_initialize() {
fi
# Perform database schema upgrade
info "Upgrading database schema"
magento_execute setup:upgrade
if ! is_boolean_yes "$MAGENTO_KEEP_STATIC" && [[ "$MAGENTO_MODE" != "production" ]]; then
info "Upgrading database schema"
magento_execute setup:upgrade
else
magento_execute setup:upgrade --keep-generated
fi
fi
# Magento includes a command for setting up the cron jobs via the 'cron:install' command

View File

@ -34,6 +34,7 @@ magento_env_vars=(
MAGENTO_EXTRA_INSTALL_ARGS
MAGENTO_ADMIN_URL_PREFIX
MAGENTO_DEPLOY_STATIC_CONTENT
MAGENTO_KEEP_STATIC
MAGENTO_SKIP_REINDEX
MAGENTO_SKIP_BOOTSTRAP
MAGENTO_USERNAME
@ -113,6 +114,7 @@ export MAGENTO_EXTRA_INSTALL_ARGS="${MAGENTO_EXTRA_INSTALL_ARGS:-}" # only used
MAGENTO_ADMIN_URL_PREFIX="${MAGENTO_ADMIN_URL_PREFIX:-"${MAGENTO_ADMINURI:-}"}"
export MAGENTO_ADMIN_URL_PREFIX="${MAGENTO_ADMIN_URL_PREFIX:-admin}" # only used during the first initialization
export MAGENTO_DEPLOY_STATIC_CONTENT="${MAGENTO_DEPLOY_STATIC_CONTENT:-no}" # only used during the first initialization
export MAGENTO_KEEP_STATIC="${MAGENTO_KEEP_STATIC:-no}"
export MAGENTO_SKIP_REINDEX="${MAGENTO_SKIP_REINDEX:-no}" # only used during the first initialization
export MAGENTO_SKIP_BOOTSTRAP="${MAGENTO_SKIP_BOOTSTRAP:-no}" # only used during the first initialization

View File

@ -36,7 +36,6 @@ Bitnami containers can be used with [Kubeapps](https://kubeapps.com/) for deploy
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/).
* [`2`, `2-debian-10`, `2.4.4`, `2.4.4-debian-10-r27`, `latest` (2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-magento/blob/2.4.4-debian-10-r27/2/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/magento GitHub repo](https://github.com/bitnami/bitnami-docker-magento).
@ -267,6 +266,7 @@ Available environment variables:
- `MAGENTO_ENABLE_HTTPS`: Whether to use SSL to access the Magento Store. Valid values: yes, no. Default: **no**
- `MAGENTO_ENABLE_ADMIN_HTTPS`: Whether to use SSL to access the Magento Admin. Valid values: yes, no. Default: **no**
- `MAGENTO_DEPLOY_STATIC_CONTENT`: Whether to deploy Magento static content during the initialization, to optimize initial page load time. Default: **no**
- `MAGENTO_KEEP_STATIC`: Whether to keep the content of 'pub/static' folder during the initialization. Default: **no**
- `MAGENTO_SKIP_REINDEX`: Whether to skip Magento re-index during the initialization. Default: **no**
- `MAGENTO_SKIP_BOOTSTRAP`: Whether to skip performing the initial bootstrapping for the application. Default: **no**