Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions compose/bin/docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,24 @@ else
DOCKER_COMPOSE="docker-compose"
fi

if [ "$1" == "--no-dev" ]; then
${DOCKER_COMPOSE} -f compose.yaml -f compose.healthcheck.yaml "${@:2}"
DOCKER_COMPOSE_YAMLS=(
compose.yaml
compose.healthcheck.yaml
)

if [[ -f src/php.ini && -f src/magento-vars.php ]]; then
DOCKER_COMPOSE_YAMLS+=(compose.multi-storefront.yaml)
fi
if [[ $1 = '--no-dev' ]]; then
shift 1
else
${DOCKER_COMPOSE} -f compose.yaml -f compose.healthcheck.yaml -f compose.dev.yaml "$@"
DOCKER_COMPOSE_YAMLS+=(compose.dev.yaml)
fi

DOCKER_COMPOSE_ARGS=()
for YAML in "${DOCKER_COMPOSE_YAMLS[@]}"; do
DOCKER_COMPOSE_ARGS+=(-f "$YAML")
done
${DOCKER_COMPOSE} \
"${DOCKER_COMPOSE_ARGS[@]}" \
"$@"
12 changes: 12 additions & 0 deletions compose/compose.multi-storefront.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3"

services:
app:
volumes: &appvolumes
# Magento Cloud-like path support
- ./src:/app:cached
# Multi-storefront support depends on "auto_prepend_file = /app/magento-vars.php" being in src/php.ini
- ./src/php.ini:/usr/local/etc/php/conf.d/local-php.ini:cached

phpfpm:
volumes: *appvolumes