diff --git a/local-environment/redis.sh b/local-environment/redis.sh deleted file mode 100755 index 22850e6a5775250692502547a51b945163d0c389..0000000000000000000000000000000000000000 --- a/local-environment/redis.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -REDIS_CONTAINER_NAME="redis_container" -REDIS_PORT="6379" - -# Stop and remove old Redis container -podman stop $REDIS_CONTAINER_NAME -podman rm -f $REDIS_CONTAINER_NAME - -# Pull Redis images -podman pull redis -podman pull redis-server - -# Run Redis container with persistent storage -podman run -d \ - -p $REDIS_PORT:$REDIS_PORT \ - --name $REDIS_CONTAINER_NAME \ - redis redis-server --save 60 1 --loglevel warning - -echo "Redis setup complete..." - -#curl -X PUT --header 'Content-Type: text/plain; charset=utf-8' --data 'foo' http://localhost:8080/state/bar -#podman exec -it redis_container redis-cli -#KEYS * \ No newline at end of file diff --git a/local-environment/setup-local.sh b/local-environment/setup-local.sh index 51b54554bbad7364cd35d4c0b57eae75ab298528..6e987f1b43b0b7c50d657d1299a24ec4928d0885 100755 --- a/local-environment/setup-local.sh +++ b/local-environment/setup-local.sh @@ -46,4 +46,10 @@ podman exec -it $CONTAINER_NAME curl -k https://$DOMAIN_NAME:$CONTAINER_HTTPS_PO echo "Testing from outside..." sudo bash -c "echo '127.0.0.1 webservice.local' >> /etc/hosts" -curl -k https://$DOMAIN_NAME:$CONTAINER_HTTPS_PORT/ \ No newline at end of file +curl -k https://$DOMAIN_NAME:$CONTAINER_HTTPS_PORT/ + +echo "Testing Redis..." +curl -k -X PUT --header 'Content-Type: text/plain; charset=utf-8' --data 'foo' https://$DOMAIN_NAME:$CONTAINER_HTTPS_PORT/state/bar + +# Check the value in the database +podman exec -it $CONTAINER_NAME redis-cli KEYS '*' \ No newline at end of file