#!/bin/bash # Docker Compose wrapper that respects ESHOP_ENABLED setting # Usage: ./docker-compose-wrapper.sh [docker-compose-args] # Read ESHOP_ENABLED from .env file ESHOP_ENABLED=$(grep "^ESHOP_ENABLED=" .env | cut -d'=' -f2 | tr -d '[:space:]') # Set up docker compose command based on ESHOP_ENABLED if [ "$ESHOP_ENABLED" = "true" ]; then # E-shop is enabled, include the eshop profile docker compose --profile eshop "$@" else # E-shop is disabled, run without eshop profile docker compose "$@" fi