corrected container and other errors

This commit is contained in:
Josako
2024-06-28 14:40:13 +02:00
parent 7a1b51dd0c
commit 9187947f68
105 changed files with 16882 additions and 2279 deletions

29
docker/reload-nginx.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Check if the service name is provided
if [ -z "$1" ]; then
echo "Usage: $0 <service_name>"
exit 1
fi
SERVICE_NAME=$1
# Get the container ID of the service
CONTAINER_ID=$(docker-compose ps -q $SERVICE_NAME)
# Check if the container ID is found
if [ -z "$CONTAINER_ID" ]; then
echo "Service $SERVICE_NAME not found or not running."
exit 1
fi
# Reload Nginx inside the container
docker exec $CONTAINER_ID nginx -s reload
# Output the result
if [ $? -eq 0 ]; then
echo "Nginx reloaded successfully in $SERVICE_NAME."
else
echo "Failed to reload Nginx in $SERVICE_NAME."
exit 1
fi