echo "install haproxy and keepalived service"
apt install -y haproxy keepalived
echo "copy and move haproxy config"
cat /etc/haproxy/haproxy.cfg
cat <<EOT >> /etc/haproxy/haproxy.cfg
listen Stats-Page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;============================================================================= | |
| ;; 1. THE CORE PROLOG ENGINE IN LISP (Unification & Backtracking) | |
| ;;============================================================================= | |
| (defun variablep (x) | |
| "Variables in our Prolog are symbols starting with a question mark, e.g., ?x" | |
| (and (symbolp x) (char= (char (symbol-name x) 0) #\?))) | |
| (defun match-variable (var input bindings) | |
| "Handles variable binding and checks for consistency." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # place this into /usr/share/icecast2/web/json.xsl | |
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> | |
| <xsl:output omit-xml-declaration="yes" method="text" indent="no" media-type="text/javascript" encoding="UTF-8"/> | |
| <xsl:strip-space elements="*"/> | |
| <xsl:template match="/icestats">{ | |
| <xsl:for-each select="source"> | |
| "<xsl:value-of select="@mount"/>":{ | |
| "server_name":"<xsl:value-of select="server_name"/>", | |
| "listeners":"<xsl:value-of select="listeners"/>", | |
| "description":"<xsl:value-of select="server_description"/>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/tcsh | |
| ## | |
| # Podcast sync script | |
| # version 1.2 | |
| # Copyright (C)2026 Dwight Spencer <[email protected]>. All Rights Reserved. | |
| # Licenced for use and distribution under the BSD 2-clause licence. | |
| ## | |
| # Example config file: | |
| # schema: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Ollama Model Export Script | |
| # Usage: bash ollama-export.sh vicuna:7b | |
| # SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR) | |
| # https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553 | |
| # Interrupt if any error occurred | |
| set -e | |
| # Declare |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| include player.mk | |
| include example.mk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM python:3.9.18-alpine3.18 | |
| RUN pip install pipx invoke[invocations] scrapy scapy beautifulsoup ansible[dockerpy,pywinrm] | |
| WORKDIR /src | |
| COPY tasks.py /src | |
| ENTRYPOINT invoke | |
| CMD --list |
This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...
Each major task has its own gist, this is to help with maitainability long term.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| ## Execute: docker compose up -D ./docker-compose.yml | |
| version: '3' | |
| services: | |
| autoscale: | |
| image: gianarb/orbiter:latest | |
| healthcheck: | |
| test: ["CMD", "exit 0"] | |
| interval: 25s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.8" | |
| # This should give a high level idea of the approach. | |
| # The complete solution is too complex and involves multiple internal microservices. | |
| # I have tried to capture core things to consider while some else needs to achieve Docker swarm based auto scalout of workers. | |
| services: | |
| webserver: | |
| image: customized/airflow:prod | |
| environment: |
NewerOlder