1
0
forked from jchomaz/Vulture

scripts de gestion

This commit is contained in:
2025-11-30 10:22:53 +01:00
parent 7c5a1d7c6b
commit f0b828a615
3 changed files with 48 additions and 0 deletions

13
VContainers/build.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -e
# Move to repository root
cd "$(dirname "$0")/.."
echo "Building VNode..."
podman build . -f ./VContainers/VNode/Containerfile -t vnode
echo "Building VApp..."
podman build . -f ./VContainers/VApp/Containerfile -t vapp
echo "Build complete."

24
VContainers/run.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -e
# Move to repository root
cd "$(dirname "$0")/.."
echo "Creating Pod vulture..."
# Check if pod exists to avoid error
if podman pod exists vulture; then
echo "Pod vulture already exists."
else
podman pod create --name vulture -p 8080:80 -p 1883:1883 -p 8081:8081 -p 8083:8083 -p 8883:8883 -p 9001:9001
fi
echo "Starting NanoMQ..."
podman run -dt --rm --pod vulture --name nanomq -v ./VContainers/MQTT/config/nanomq.conf:/etc/nanomq.conf docker.io/emqx/nanomq:latest --conf /etc/nanomq.conf
echo "Starting VNode..."
podman run -dt --rm --pod vulture --name vnode vnode:latest
echo "Starting VApp..."
podman run -dt --rm --pod vulture --name vapp vapp:latest
echo "All containers started."

11
VContainers/stop.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
echo "Stopping containers..."
podman stop vapp || echo "vapp not running"
podman stop vnode || echo "vnode not running"
podman stop nanomq || echo "nanomq not running"
echo "Removing pod..."
podman pod rm vulture || echo "Pod vulture not found"
echo "Cleanup complete."