Compare commits

..

2 Commits

2 changed files with 48 additions and 21 deletions

View File

@ -23,6 +23,7 @@ ENV_FILE="$SCRIPT_DIR/.env"
SERVICES_YAML="$SCRIPT_DIR/configs/homepage/services.yaml"
WIDGETS_YAML="$SCRIPT_DIR/configs/homepage/widgets.yaml"
MKDOCS_MAIN_HTML="$SCRIPT_DIR/mkdocs/docs/overrides/main.html"
MKDOCS_YML="$SCRIPT_DIR/mkdocs/mkdocs.yml"
echo "Looking for .env file at: $ENV_FILE"
@ -405,6 +406,35 @@ update_widgets_yaml() {
return 0
}
# Function to update the site_url in mkdocs.yml
update_mkdocs_yml() {
local new_domain=$1
if [ ! -f "$MKDOCS_YML" ]; then
echo "Warning: mkdocs.yml not found at $MKDOCS_YML"
return 1
fi
echo "Updating site_url in mkdocs.yml..."
# Create a backup of the mkdocs.yml file
local timestamp=$(date +"%Y%m%d_%H%M%S")
local backup_file="${MKDOCS_YML}.backup_${timestamp}"
cp "$MKDOCS_YML" "$backup_file"
echo "Created backup of mkdocs.yml at $backup_file"
# Update the site_url value
sed -i "s|^site_url:.*|site_url: https://$new_domain|" "$MKDOCS_YML"
if grep -q "site_url: https://$new_domain" "$MKDOCS_YML"; then
echo "Updated site_url in mkdocs.yml to: https://$new_domain"
return 0
else
echo "Warning: Failed to update site_url in mkdocs.yml"
return 1
fi
}
# Make sure the initialize_env_file function is available
initialize_env_file
@ -440,7 +470,7 @@ update_env_var "EXCALIDRAW_PUBLIC_SOCKET_URL" "https://excalidraw.$domain_name"
# Update OpenWebUI settings
echo -e "\nConfiguring OpenWebUI..."
update_env_var "OPEN_WEBUI_PORT" "3005"
update_env_var "OPEN_WEBUI_URL" "https://open-webui.$domain_name"
update_env_var "OPEN_WEBUI_URL" "https://open-web-ui.$domain_name"
# Update service URLs in the services.yaml file
echo -e "\nUpdating service URLs in services.yaml file..."
@ -454,6 +484,10 @@ update_widgets_yaml "$domain_name"
echo -e "\nUpdating login button URL in MkDocs main.html..."
update_mkdocs_main_html "$domain_name"
# Update the site_url in mkdocs.yml
echo -e "\nUpdating site_url in mkdocs.yml..."
update_mkdocs_yml "$domain_name"
echo -e "Domain settings have been updated successfully!\n"
# Listmonk Admin Credentials configuration

View File

@ -5,7 +5,7 @@ services:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage-changemaker
ports:
- 3010:3000
- "${HOMEPAGE_PORT:-3010}:3000"
volumes:
- ./configs/homepage:/app/config
- ./assets/icons:/app/public/icons
@ -24,7 +24,7 @@ services:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage-changemaker-local
ports:
- 3011:3000
- "${HOMEPAGE_LOCAL_PORT:-3011}:3000"
volumes:
- ./configs/homepage-local:/app/config
- ./assets/icons:/app/public/icons
@ -136,7 +136,7 @@ services:
container_name: listmonk_app
restart: unless-stopped
ports:
- "9000:9000"
- "${LISTMONK_PORT:-9000}:9000"
networks:
- changemaker
hostname: ${LISTMONK_HOSTNAME}
@ -166,7 +166,7 @@ services:
container_name: listmonk-db
restart: unless-stopped
ports:
- "0.0.0.0:5432:5432"
- "${LISTMONK_DB_PORT:-5432}:5432"
networks:
- changemaker
environment:
@ -190,7 +190,7 @@ services:
depends_on:
- monica-db
ports:
- 8085:80
- "${MONICA_PORT:-8085}:80"
environment:
- APP_KEY=${MONICA_APP_KEY}
- DB_HOST=monica-db
@ -245,7 +245,7 @@ services:
volumes:
- ./mkdocs/site:/config/www # Mounts your static site to Nginx's web root
ports:
- "4001:80" # Exposes Nginx's port 80 to host port 4001
- "${MKDOCS_SITE_SERVER_PORT:-4001}:80" # Exposes Nginx's port 80 to host port 4001
restart: unless-stopped
networks:
- changemaker
@ -291,17 +291,10 @@ services:
ollama:
image: ollama/ollama
container_name: ollama-changemaker
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
- ollama:/root/.ollama
ports:
- "11435:11434"
- "${OLLAMA_PORT:-11435}:11434"
restart: unless-stopped
networks:
- changemaker
@ -367,8 +360,8 @@ services:
networks:
- changemaker
ports:
- "8005:8000"
- "9444:9443"
- "${PORTAINER_PORT:-8005}:8000"
- "${PORTAINER_HTTPS_PORT:-9444}:9443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
@ -378,7 +371,7 @@ services:
image: ghcr.io/lyqht/mini-qr:latest
container_name: mini-qr
ports:
- 8081:8080
- "${MINI_QR_PORT:-8081}:8080"
restart: unless-stopped
networks:
- changemaker
@ -398,8 +391,8 @@ services:
volumes:
- ./configs/ferdium:/config
ports:
- 3009:3009
- 3006:3006
- "${FERDIUM_PORT:-3009}:3009"
- "${FERDIUM_HTTPS_PORT:-3006}:3006"
shm_size: "1gb"
restart: unless-stopped
networks:
@ -431,7 +424,7 @@ services:
NC_DB: "pg://root_db:5432?u=postgres&p=password&d=root_db"
image: "nocodb/nocodb:latest"
ports:
- "8090:8080"
- "${NOCODB_PORT:-8090}:8080"
restart: always
volumes:
- "nc_data:/usr/app/data"