removed extra scripts
This commit is contained in:
parent
01a3b8f05f
commit
3131304bca
@ -1,43 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Script to verify MkDocs and its dependencies
|
|
||||||
|
|
||||||
echo "=== MkDocs Environment Check ==="
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Check Python version
|
|
||||||
echo "Python version:"
|
|
||||||
python3 --version
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Check MkDocs version
|
|
||||||
echo "MkDocs version:"
|
|
||||||
mkdocs --version
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Check if cairosvg and PIL are available (needed for social cards)
|
|
||||||
echo "Checking for cairosvg and PIL (needed for social cards):"
|
|
||||||
python3 -c "import cairosvg; print('cairosvg is installed')" 2>/dev/null || echo "cairosvg is NOT installed"
|
|
||||||
python3 -c "from PIL import Image; print('PIL is installed')" 2>/dev/null || echo "PIL is NOT installed"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# List all installed MkDocs plugins
|
|
||||||
echo "Installed MkDocs plugins:"
|
|
||||||
pip list | grep -i mkdocs
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Check specific critical packages
|
|
||||||
echo "Checking critical dependencies:"
|
|
||||||
for pkg in cairosvg pillow pymdown-extensions pygments
|
|
||||||
do
|
|
||||||
pip show $pkg 2>/dev/null | grep "^Version:" || echo "$pkg is NOT installed"
|
|
||||||
done
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Test MkDocs build capability
|
|
||||||
echo "Testing MkDocs build capability:"
|
|
||||||
cd ~/mkdocs
|
|
||||||
mkdocs build --dry-run 2>&1 | grep -v "INFO"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
echo "=== End of Check ==="
|
|
4
mkdocs/.vscode/settings.json
vendored
4
mkdocs/.vscode/settings.json
vendored
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"twinny.ollamaApiPort": 11434,
|
|
||||||
"twinny.ollamaHostname": "ollama"
|
|
||||||
}
|
|
137
post-install.sh
137
post-install.sh
@ -1,137 +0,0 @@
|
|||||||
cat << "EOF"
|
|
||||||
██████╗██╗ ██╗ █████╗ ███╗ ██╗ ██████╗ ███████╗
|
|
||||||
██╔════╝██║ ██║██╔══██╗████╗ ██║██╔════╝ ██╔════╝
|
|
||||||
██║ ███████║███████║██╔██╗ ██║██║ ███╗█████╗
|
|
||||||
██║ ██╔══██║██╔══██║██║╚██╗██║██║ ██║██╔══╝
|
|
||||||
╚██████╗██║ ██║██║ ██║██║ ╚████║╚██████╔╝███████╗
|
|
||||||
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
|
|
||||||
|
|
||||||
███╗ ███╗ █████╗ ██╗ ██╗███████╗██████╗
|
|
||||||
████╗ ████║██╔══██╗██║ ██╔╝██╔════╝██╔══██╗
|
|
||||||
██╔████╔██║███████║█████╔╝ █████╗ ██████╔╝
|
|
||||||
██║╚██╔╝██║██╔══██║██╔═██╗ ██╔══╝ ██╔══██╗
|
|
||||||
██║ ╚═╝ ██║██║ ██║██║ ██╗███████╗██║ ██║
|
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
|
||||||
Post-Install Wizard
|
|
||||||
|
|
||||||
echo "Welcome to the Post-Install Wizard!"
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Update services.yaml with domain from .env
|
|
||||||
echo "Updating service configurations with domain from .env..."
|
|
||||||
|
|
||||||
ENV_FILE="/mnt/samsung500/Change Maker Dev/Changemaker/.env"
|
|
||||||
SERVICES_FILE="/mnt/samsung500/Change Maker Dev/Changemaker/configs/homepage/services.yaml"
|
|
||||||
|
|
||||||
if [ -f "$ENV_FILE" ]; then
|
|
||||||
DOMAIN=$(grep -E "^DOMAIN=" "$ENV_FILE" | cut -d= -f2)
|
|
||||||
|
|
||||||
if [ -n "$DOMAIN" ]; then
|
|
||||||
echo "Found domain: $DOMAIN"
|
|
||||||
|
|
||||||
# Update Cloudflare configuration with domain
|
|
||||||
CLOUDFLARE_CONFIG="/mnt/samsung500/Change Maker Dev/Changemaker/example.cloudflare.config.yml"
|
|
||||||
if [ -f "$CLOUDFLARE_CONFIG" ]; then
|
|
||||||
echo "Updating Cloudflare configuration with domain: $DOMAIN"
|
|
||||||
|
|
||||||
# Create backup of Cloudflare config file
|
|
||||||
cp "$CLOUDFLARE_CONFIG" "${CLOUDFLARE_CONFIG}.bak"
|
|
||||||
|
|
||||||
# Replace example.org with actual domain while preserving sanitized placeholders
|
|
||||||
sed -i "s/betteredmonton\.org/$DOMAIN.org/g" "$CLOUDFLARE_CONFIG"
|
|
||||||
|
|
||||||
echo "✅ Cloudflare configuration updated with domain: $DOMAIN"
|
|
||||||
|
|
||||||
if [ -f "$SERVICES_FILE" ]; then
|
|
||||||
echo "Updating services.yaml with URLs from Cloudflare config..."
|
|
||||||
|
|
||||||
# Create backup of services file
|
|
||||||
cp "$SERVICES_FILE" "${SERVICES_FILE}.bak"
|
|
||||||
|
|
||||||
# Extract hostname and port mappings from Cloudflare config
|
|
||||||
# Format: hostname -> port
|
|
||||||
declare -A HOSTNAME_TO_PORT
|
|
||||||
|
|
||||||
# Parse the Cloudflare config file to extract hostname -> port mappings
|
|
||||||
while IFS= read -r line; do
|
|
||||||
if [[ $line =~ hostname:\ *([^\ ]+) ]]; then
|
|
||||||
hostname="${BASH_REMATCH[1]}"
|
|
||||||
# Read the next line which should contain the service URL with port
|
|
||||||
read -r service_line
|
|
||||||
if [[ $service_line =~ service:\ *http://localhost:([0-9]+) ]]; then
|
|
||||||
port="${BASH_REMATCH[1]}"
|
|
||||||
HOSTNAME_TO_PORT["$hostname"]="$port"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done < "$CLOUDFLARE_CONFIG"
|
|
||||||
|
|
||||||
# Now update the services.yaml file
|
|
||||||
# Create a temporary file to hold the modified content
|
|
||||||
TEMP_FILE=$(mktemp)
|
|
||||||
|
|
||||||
# Use awk to find and replace href URLs in services.yaml
|
|
||||||
awk -v domain="$DOMAIN.org" '
|
|
||||||
BEGIN {
|
|
||||||
# Add all hostname->port mappings from our associative array
|
|
||||||
# These will be populated by the shell via environment variables
|
|
||||||
split("", hostnames)
|
|
||||||
split("", ports)
|
|
||||||
for (i = 1; ENVIRON["HOSTNAME_" i] != ""; i++) {
|
|
||||||
hostnames[i] = ENVIRON["HOSTNAME_" i]
|
|
||||||
ports[i] = ENVIRON["PORT_" i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
# If the line contains an href with a port
|
|
||||||
if ($0 ~ /href:.*:[0-9]+\//) {
|
|
||||||
for (i in hostnames) {
|
|
||||||
# If the line contains the port number, replace with the hostname
|
|
||||||
if ($0 ~ ":" ports[i] "/") {
|
|
||||||
# Replace the entire URL
|
|
||||||
sub(/href:.*/, "href: http://" hostnames[i] "/")
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# Print the line (modified or not)
|
|
||||||
print $0
|
|
||||||
}' "$SERVICES_FILE" > "$TEMP_FILE"
|
|
||||||
|
|
||||||
# Export the hostname->port mappings as environment variables for awk
|
|
||||||
idx=1
|
|
||||||
for hostname in "${!HOSTNAME_TO_PORT[@]}"; do
|
|
||||||
export "HOSTNAME_$idx=$hostname"
|
|
||||||
export "PORT_$idx=${HOSTNAME_TO_PORT[$hostname]}"
|
|
||||||
((idx++))
|
|
||||||
done
|
|
||||||
|
|
||||||
# Replace the original file with our modified version
|
|
||||||
mv "$TEMP_FILE" "$SERVICES_FILE"
|
|
||||||
|
|
||||||
# Clean up environment variables
|
|
||||||
for ((i=1; i<=idx; i++)); do
|
|
||||||
unset "HOSTNAME_$i" "PORT_$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "✅ Services configuration updated with hostnames from Cloudflare config"
|
|
||||||
else
|
|
||||||
echo "❌ Services file not found: $SERVICES_FILE"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "❌ Cloudflare config file not found: $CLOUDFLARE_CONFIG"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "❌ DOMAIN value not found in .env file"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "❌ .env file not found: $ENV_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Pull Gemma3 model from Ollama
|
|
||||||
docker exec -it ollama ollama pull gemma3
|
|
||||||
|
|
||||||
# Inform users about setting up OpenWebUI with Ollama
|
|
||||||
echo "✅ Now you can visit OpenWebUI at http://$DOMAIN:${OPEN_WEBUI_PORT:-3005} and connect it to Ollama"
|
|
||||||
echo " Configure OpenWebUI to use the Ollama API at: http://ollama:11435"
|
|
176
reset.sh
176
reset.sh
@ -1,176 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cat << "EOF"
|
|
||||||
██████╗██╗ ██╗ █████╗ ███╗ ██╗ ██████╗ ███████╗
|
|
||||||
██╔════╝██║ ██║██╔══██╗████╗ ██║██╔════╝ ██╔════╝
|
|
||||||
██║ ███████║███████║██╔██╗ ██║██║ ███╗█████╗
|
|
||||||
██║ ██╔══██║██╔══██║██║╚██╗██║██║ ██║██╔══╝
|
|
||||||
╚██████╗██║ ██║██║ ██║██║ ╚████║╚██████╔╝███████╗
|
|
||||||
╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
|
|
||||||
|
|
||||||
███╗ ███╗ █████╗ ██╗ ██╗███████╗██████╗
|
|
||||||
████╗ ████║██╔══██╗██║ ██╔╝██╔════╝██╔══██╗
|
|
||||||
██╔████╔██║███████║█████╔╝ █████╗ ██████╔╝
|
|
||||||
██║╚██╔╝██║██╔══██║██╔═██╗ ██╔══╝ ██╔══██╗
|
|
||||||
██║ ╚═╝ ██║██║ ██║██║ ██╗███████╗██║ ██║
|
|
||||||
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
|
||||||
Reset Wizard
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo -e "\n\nWelcome to the Changemaker Reset Wizard!\n"
|
|
||||||
echo "This script will help you reset your Changemaker instance."
|
|
||||||
|
|
||||||
# Ask for confirmation
|
|
||||||
echo -e "\nThis will stop all running containers, delete all files in configs/code-server and configs/ferdium directories"
|
|
||||||
echo "and reset the .env file to base values."
|
|
||||||
echo -e "\n⚠️ WARNING: This action cannot be undone! ⚠️"
|
|
||||||
read -p "Do you want to continue? (y/n): " confirm
|
|
||||||
if [[ $confirm != [yY]* ]]; then
|
|
||||||
echo "Reset canceled."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Stop all running containers
|
|
||||||
echo -e "\nStopping all running containers..."
|
|
||||||
docker compose down
|
|
||||||
echo "All containers have been stopped."
|
|
||||||
|
|
||||||
# Create a timestamp for backups
|
|
||||||
timestamp=$(date +"%Y%m%d_%H%M%S")
|
|
||||||
|
|
||||||
# Backup the .env file
|
|
||||||
if [ -f .env ]; then
|
|
||||||
echo -e "\nCreating backup of .env file..."
|
|
||||||
cp .env ".env.backup_$timestamp"
|
|
||||||
echo "Backup created as .env.backup_$timestamp"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Delete specified directories
|
|
||||||
echo -e "\nDeleting files in configs/code-server and configs/ferdium..."
|
|
||||||
|
|
||||||
# Check if directories exist before attempting to delete
|
|
||||||
if [ -d "configs/code-server" ]; then
|
|
||||||
rm -rf configs/code-server/*
|
|
||||||
echo "- Cleared configs/code-server/"
|
|
||||||
else
|
|
||||||
mkdir -p configs/code-server
|
|
||||||
echo "- Created configs/code-server/ (directory didn't exist)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "configs/ferdium" ]; then
|
|
||||||
rm -rf configs/ferdium/*
|
|
||||||
echo "- Cleared configs/ferdium/"
|
|
||||||
else
|
|
||||||
mkdir -p configs/ferdium
|
|
||||||
echo "- Created configs/ferdium/ (directory didn't exist)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Reset the .env file to base values
|
|
||||||
echo -e "\nResetting .env file to base values..."
|
|
||||||
cat > .env << 'ENVEOF'
|
|
||||||
DOMAIN=hello.com
|
|
||||||
|
|
||||||
# Listmonk Admin Credentials
|
|
||||||
LISTMONK_ADMIN_USER=test
|
|
||||||
LISTMONK_ADMIN_PASSWORD=password
|
|
||||||
|
|
||||||
# OpenWebUI Configuration
|
|
||||||
OPEN_WEBUI_PORT=3005
|
|
||||||
|
|
||||||
# Database Credentials
|
|
||||||
POSTGRES_USER=listmonk
|
|
||||||
POSTGRES_PASSWORD=password
|
|
||||||
POSTGRES_DB=listmonk
|
|
||||||
|
|
||||||
# Application Configuration
|
|
||||||
LISTMONK_PORT=9000
|
|
||||||
LISTMONK_HOSTNAME=listmonk.hello.com
|
|
||||||
|
|
||||||
# Monica CRM Configuration
|
|
||||||
MONICA_APP_KEY=base64:random-key
|
|
||||||
MONICA_DB_USERNAME=monica
|
|
||||||
MONICA_DB_PASSWORD=password
|
|
||||||
|
|
||||||
# Monica Database Configuration
|
|
||||||
MONICA_MYSQL_DATABASE=monica
|
|
||||||
MONICA_MYSQL_USER=monica
|
|
||||||
MONICA_MYSQL_PASSWORD=password
|
|
||||||
|
|
||||||
# MkDocs Configuration
|
|
||||||
USER_ID=1000
|
|
||||||
GROUP_ID=1000
|
|
||||||
MKDOCS_PORT=4000
|
|
||||||
BASE_DOMAIN=https://hello.com
|
|
||||||
|
|
||||||
# Flatnotes Configuration
|
|
||||||
FLATNOTES_PUID=1000
|
|
||||||
FLATNOTES_PGID=1000
|
|
||||||
FLATNOTES_AUTH_TYPE=password
|
|
||||||
FLATNOTES_USERNAME=test
|
|
||||||
FLATNOTES_PASSWORD=test
|
|
||||||
FLATNOTES_SECRET_KEY=random-secret-key
|
|
||||||
FLATNOTES_PORT=8089
|
|
||||||
|
|
||||||
# Gitea Configuration
|
|
||||||
GITEA_DB_TYPE=mysql
|
|
||||||
GITEA_DB_HOST=gitea-db:3306
|
|
||||||
GITEA_DB_NAME=gitea
|
|
||||||
GITEA_DB_USER=gitea
|
|
||||||
GITEA_DB_PASSWD=password
|
|
||||||
GITEA_DB_ROOT_PASSWORD=password
|
|
||||||
GITEA_WEB_PORT=3030
|
|
||||||
GITEA_SSH_PORT=2225
|
|
||||||
GITEA_ROOT_URL=https://gitea.hello.com
|
|
||||||
GITEA_DOMAIN=gitea.hello.com
|
|
||||||
|
|
||||||
# Apache Answer Configuration
|
|
||||||
ANSWER_APP_PORT=9080
|
|
||||||
|
|
||||||
# Excalidraw Configuration
|
|
||||||
EXCALIDRAW_PORT=3333
|
|
||||||
EXCALIDRAW_LIBRARY_URL=https://libraries.excalidraw.com
|
|
||||||
EXCALIDRAW_LIBRARY_BACKEND=https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries
|
|
||||||
# For Cloudflare Tunnel - update these values with your Cloudflare Tunnel domain
|
|
||||||
EXCALIDRAW_PUBLIC_URL=https://excalidraw.hello.com
|
|
||||||
EXCALIDRAW_PUBLIC_SOCKET_URL=https://excalidraw.hello.com
|
|
||||||
|
|
||||||
# Code Server Configuration
|
|
||||||
CODE_SERVER_PORT=8888
|
|
||||||
USER_NAME=coder
|
|
||||||
|
|
||||||
# Cloudflare Credentials - Replace with your actual values
|
|
||||||
CF_AUTH_EMAIL=your_cloudflare_email@example.com
|
|
||||||
CF_AUTH_KEY=your_cloudflare_global_api_key
|
|
||||||
CF_ZONE_ID=your_cloudflare_zone_id
|
|
||||||
CF_TUNNEL_ID=your_cloudflared_tunnel_id
|
|
||||||
CF_DOMAIN=yourdomain.com
|
|
||||||
|
|
||||||
# NocoDB Configuration
|
|
||||||
NOCODB_PORT=8090
|
|
||||||
NOCODB_JWT_SECRET=replace-with-secure-random-string
|
|
||||||
NOCODB_DB_NAME=nocodb
|
|
||||||
NOCODB_DB_USER=noco
|
|
||||||
NOCODB_DB_PASSWORD=password
|
|
||||||
# Connection string format: pg://nocodb-db:5432?u=noco&p=password&d=nocodb
|
|
||||||
|
|
||||||
# n8n Configuration
|
|
||||||
N8N_PORT=5678
|
|
||||||
N8N_HOST=n8n.hello.com
|
|
||||||
GENERIC_TIMEZONE=UTC
|
|
||||||
N8N_ENCRYPTION_KEY=change-me-please
|
|
||||||
N8N_USER_EMAIL=admin@example.com
|
|
||||||
N8N_USER_PASSWORD=changeMe
|
|
||||||
|
|
||||||
# ConvertX Configuration
|
|
||||||
CONVERTX_PORT=3100
|
|
||||||
CONVERTX_JWT_SECRET=aLongAndSecretStringUsedToSignTheJSONWebToken1234
|
|
||||||
ENVEOF
|
|
||||||
|
|
||||||
echo -e "\n✅ Reset completed successfully!"
|
|
||||||
echo "The following actions were performed:"
|
|
||||||
echo " - All Docker containers were stopped"
|
|
||||||
echo " - Directories configs/code-server and configs/ferdium were cleared"
|
|
||||||
echo " - .env file was reset to base values"
|
|
||||||
echo " - A backup of your original .env file was created (if it existed)"
|
|
||||||
echo -e "\nYour Changemaker instance is now reset to default settings."
|
|
||||||
echo "You can restart your services with 'docker compose up -d' when ready."
|
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# This script sets up the mkdocs environment in the code-server container
|
|
||||||
|
|
||||||
# Create a symbolic link to the check script in the container's .local/bin directory
|
|
||||||
echo "Creating a symbolic link to the mkdocs-check.sh script..."
|
|
||||||
CODE_SERVER_CONTAINER_ID=$(docker ps -qf "name=code-server-changemaker")
|
|
||||||
|
|
||||||
if [ -z "$CODE_SERVER_CONTAINER_ID" ]; then
|
|
||||||
echo "Error: code-server container is not running"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy the check script into the container
|
|
||||||
docker cp /home/bunker-admin/Changemaker/mkdocs-check.sh $CODE_SERVER_CONTAINER_ID:/home/coder/.local/bin/
|
|
||||||
docker exec -u coder $CODE_SERVER_CONTAINER_ID chmod +x /home/coder/.local/bin/mkdocs-check.sh
|
|
||||||
|
|
||||||
echo "Setup complete! You can now use the mkdocs-check.sh script inside the code-server container."
|
|
||||||
echo "Access it by running: mkdocs-check.sh"
|
|
Loading…
x
Reference in New Issue
Block a user