This commit is contained in:
2026-03-23 09:58:40 -03:00
parent 9c9c7dff09
commit 8186bb5fe6
40 changed files with 3996 additions and 17 deletions

View File

@@ -3,14 +3,15 @@
# Usage: ./run.sh [OPTIONS] [docker-compose args]
#
# Options:
# -f, --foreground Run in foreground (don't detach)
# -d, --detach Run detached (background)
# --build Rebuild images before starting
# stop Stop all services
#
# Examples:
# ./run.sh # Start detached
# ./run.sh -f # Start in foreground (see logs)
# ./run.sh # Start attached (see logs)
# ./run.sh -d # Start detached
# ./run.sh --build # Rebuild and start
# ./run.sh logs -f # Follow logs
# ./run.sh stop # Stop all services
set -e
@@ -35,19 +36,23 @@ if ! grep -q "mpr.local.ar" /etc/hosts 2>/dev/null; then
fi
# Parse options
DETACH="-d"
DETACH=""
BUILD=""
while [[ $# -gt 0 ]]; do
case $1 in
-f|--foreground)
DETACH=""
-d|--detach)
DETACH="-d"
shift
;;
--build)
BUILD="--build"
shift
;;
stop)
docker compose down
exit $?
;;
*)
# Pass remaining args to docker compose
docker compose "$@"
@@ -56,5 +61,5 @@ while [[ $# -gt 0 ]]; do
esac
done
# Default: up with options
# Default: up attached
docker compose up $DETACH $BUILD