#!/usr/bin/env sh set -e ENV=${1:-test} MODE=${2:-no-build} ENVFILE="" if [ -f ".env.$ENV" ]; then ENVFILE="--env-file .env.$ENV"; fi case "$MODE" in no-build) APP_ENV=$ENV docker compose $ENVFILE up -d ;; rebuild) APP_ENV=$ENV docker compose $ENVFILE build --no-cache APP_ENV=$ENV docker compose $ENVFILE up -d ;; pull) APP_ENV=$ENV docker compose $ENVFILE build --pull APP_ENV=$ENV docker compose $ENVFILE up -d ;; build|*) APP_ENV=$ENV docker compose $ENVFILE up -d --build ;; esac