ResourceHub API. Not for production. Get/Post, Json Serialize/Deserialize

This commit is contained in:
SocioCyber
2026-03-03 06:44:24 -07:00
commit 8a4b324832
22 changed files with 2678 additions and 0 deletions

34
ResourceHub/Database/run.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# Check if .env file already exists
if [ -f .env ]; then
echo ".env file already exists. Starting Docker Compose..."
else
# Prompt the user for the Redis password
read -p "Set a Redis port: " REDIS_PORT
read -p "Enter your new Redis password: " REDIS_PASSWORD
echo
# Create the .env file and write the password
cat <<EOL > .env
REDIS_PORT=$REDIS_PORT
REDIS_PASSWORD=$REDIS_PASSWORD
EOL
# Inform the user
echo ".env file created"
echo
echo "--------------------------------------------------------------"
echo "Redis Database accesed with URI: http://127.0.0.1:$REDIS_PORT"
echo "Redis password is: $REDIS_PASSWORD"
echo "--------------------------------------------------------------"
fi
# Start Docker Compose
docker-compose up -d
# show docker container
echo
docker ps