django and fastapi apps
This commit is contained in:
33
ctrl/run.sh
Executable file
33
ctrl/run.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# Run MPR stack locally
|
||||
# Usage: ./ctrl/run.sh [docker-compose args]
|
||||
#
|
||||
# Examples:
|
||||
# ./ctrl/run.sh # Start all services
|
||||
# ./ctrl/run.sh --build # Rebuild and start
|
||||
# ./ctrl/run.sh -d # Detached mode
|
||||
# ./ctrl/run.sh down # Stop all
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
# Load env
|
||||
if [ -f .env ]; then
|
||||
set -a
|
||||
source .env
|
||||
set +a
|
||||
else
|
||||
echo "Warning: .env not found, using defaults"
|
||||
echo "Copy .env.template to .env to customize"
|
||||
fi
|
||||
|
||||
# Check /etc/hosts
|
||||
if ! grep -q "mpr.local.ar" /etc/hosts 2>/dev/null; then
|
||||
echo "Note: Add to /etc/hosts:"
|
||||
echo " 127.0.0.1 mpr.local.ar"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
docker compose "$@"
|
||||
Reference in New Issue
Block a user