Add a run.sh with build, up, down and logs.

This commit is contained in:
Hemang
2025-02-04 16:15:23 +01:00
parent c1f6eb2ef3
commit 8ce36c2579
Executable
+39
View File
@@ -0,0 +1,39 @@
up() {
# Ensure the main network exists
docker network inspect invariant-explorer-web >/dev/null 2>&1 || \
docker network create invariant-explorer-web
# Start your local docker-compose services
docker compose -f docker-compose.local.yml up -d
echo "Proxy started at http://localhost/api/v1/proxy/"
echo "See http://localhost/api/v1/proxy/docs for API documentation"
}
build() {
# Build local services
docker compose -f docker-compose.local.yml build
}
down() {
# Bring down local services
docker compose -f docker-compose.local.yml down
}
# -----------------------------
# Command dispatcher
# -----------------------------
case "$1" in
"up")
up
;;
"build")
build
;;
"down")
down
;;
"logs")
docker compose -f docker-compose.local.yml logs -f
;;
esac