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
# Path to the file containing key-value pairs | |
ENV_FILE="..." | |
# Check if the file exists and is not empty | |
if [[ -f "$ENV_FILE" && -s "$ENV_FILE" ]]; then | |
echo "Loading environment variables from $ENV_FILE..." | |
# Read the file line by line | |
while IFS='=' read -r key value; do |
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
sudo docker service create --name=mosquitto \ | |
--replicas=5 \ | |
--publish published=1883,target=3881 \ | |
--restart-condition=on-failure \ | |
--limit-memory=100M \ | |
--limit-cpu=1 \ | |
--constraint=node.labels.mqtt==true \ | |
eclipse-mosquitto:2.0.22-openssl | |
echo "+-----------------------------+" |
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
sudo docker service create --name=mosquitto \ | |
--replicas=5 \ | |
--publish published=1883,target=3881 \ | |
--restart-condition=on-failure \ | |
--limit-memory=100M \ | |
--limit-cpu=1 \ | |
eclipse-mosquitto:2.0.22-openssl | |
echo "+-----------------------------+" | |
echo "| Checking installed services |" |
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
sudo docker service create --name=hivemq-edge \ | |
--replicas=5 \ | |
--publish published=5001,target=5100 \ | |
--restart-condition=on-failure \ | |
--limit-memory=100M \ | |
--limit-cpu=1 \ | |
--constraint=node.labels.mqtt==true \ | |
hivemq/hivemq-edge:2025.8 | |
echo "+-----------------------------+" |
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
sudo docker service create --name hivemq-edge \ | |
--replicas 5 \ | |
--publish published=5001,target=5100 \ | |
--restart-condition=on-failure \ | |
--limit-memory 100M \ | |
--limit-cpu 1 \ | |
hivemq/hivemq-edge:2025.8 | |
echo "+-----------------------------+" | |
echo "| Checking installed services |" |
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' | |
services: | |
registry-server: | |
image: registry:2 | |
container_name: registry-server | |
restart: always | |
ports: | |
- "5555:5000" |
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 | |
curl -sL https://raw.githubusercontent.com/ezekeal/scripts/main/docker-pi.sh | bash | |
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc | |
chmod a+r /etc/apt/keyrings/docker.asc | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ | |
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | |
tee /etc/apt/sources.list.d/docker.list > /dev/null | |
apt-get update -y |
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 | |
kas-docker build kas/poky.yml:kas/tftp.yml |
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 | |
# In case of issue running Docker, please add your user to the docker's group | |
# | |
# sudo usermod -aG docker ${USER} | |
# | |
# then, logout and log in | |
git clone https://github.com/siemens/kas |
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
# | |
# check_if_file_contains_string | |
# - param1: file containing the text | |
# - param2: string to find | |
# - param3: message for success | |
# - param4: message for failure | |
# | |
check_if_file_contains_string() { |
NewerOlder