Skip to content

Commit

Permalink
Compose verbose configuration (#541)
Browse files Browse the repository at this point in the history
* Compose verbose configuration option

* Update 02-deploy.file.reference.v1.md
  • Loading branch information
alexanderM91 authored Dec 12, 2024
1 parent a3ce862 commit b9109ce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/sdk/images/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function Images::_buildApp() {
--build-arg "SPRYKER_DB_ENGINE=${SPRYKER_DB_ENGINE}" \
--build-arg "SPRYKER_COMPOSER_MODE=${SPRYKER_COMPOSER_MODE}" \
--build-arg "SPRYKER_COMPOSER_AUTOLOAD=${SPRYKER_COMPOSER_AUTOLOAD}" \
--build-arg "SPRYKER_COMPOSER_VERBOSE=${SPRYKER_COMPOSER_VERBOSE}" \
--build-arg "SPRYKER_BUILD_HASH=${SPRYKER_BUILD_HASH:-"current"}" \
--build-arg "SPRYKER_BUILD_STAMP=${SPRYKER_BUILD_STAMP:-""}" \
. 1>&2
Expand Down
3 changes: 3 additions & 0 deletions docs/07-deploy-file/02-deploy.file.reference.v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,9 @@ Defines the composer settings to be used during deployment.
2. `autoload:` - defines composer autoload options. Possible values are `--optimize` and `--classmap-authoritative`. This variable is optional. If not specified, the default values apply:
* Development mode: `autoload: --optimize`
* Demo mode: `autoload: --classmap-authoritative`
3. `verbose:` - defines composer verbose mode. The default values is `-vvv`. Possible values are:
* `-q` (Do not output any message).
* `-v`, `-vv` and `-vvv`
***

## Services
Expand Down
1 change: 1 addition & 0 deletions generator/src/templates/deploy.bash.twig
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ readonly SPRYKER_DOCKER_TAG="{{ tag | default('1.0') }}"
readonly SPRYKER_FRONTEND_IMAGE="{{ assets['image'] | default('nginx:alpine') }}"
readonly SPRYKER_COMPOSER_MODE="{{ composer.mode | default('') }}"
readonly SPRYKER_COMPOSER_AUTOLOAD="{{ composer.autoload | default('') }}"
readonly SPRYKER_COMPOSER_VERBOSE="{{ composer.verbose is defined ? composer.verbose : '-vvv' }}"
readonly SPRYKER_LOG_DIRECTORY="{{ docker['logs']['path'] | default('/var/log/spryker') }}"
readonly SPRYKER_ASSETS_MODE="{{ assets['mode'] | default('development') }}"
readonly SPRYKER_DB_ENGINE="{{ services['database']['engine'] == 'mysql' ? 'mysql' : 'pgsql' }}"
Expand Down
3 changes: 2 additions & 1 deletion images/baked/application/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ USER spryker
# Install composer modules for Spryker
COPY --chown=spryker:spryker composer.json composer.lock ${srcRoot}/
ARG SPRYKER_COMPOSER_MODE
ARG SPRYKER_COMPOSER_VERBOSE
RUN --mount=type=cache,id=composer,sharing=locked,target=/home/spryker/.composer/cache,uid=1000 \
--mount=type=ssh,uid=1000 --mount=type=secret,id=secrets-env,uid=1000 \
set -o allexport && . /run/secrets/secrets-env && set +o allexport \
&& composer install --no-scripts --no-interaction ${SPRYKER_COMPOSER_MODE} -vvv
&& composer install --no-scripts --no-interaction ${SPRYKER_COMPOSER_MODE} ${SPRYKER_COMPOSER_VERBOSE}

FROM application-production-dependencies AS application-production-codebase

Expand Down

0 comments on commit b9109ce

Please sign in to comment.