Vue normale
-
- GitHub - louislam/dockge: A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager
Upgrader une instance PostgreSQL docker
Du commit GitHub au container à jour : workflow Docker simplifié
Il arrive que des gens publient un code sur GitHub avec un Dockerfile mais sans package. Le container est donc à construire soi-même, localement.
Ça peut se faire directement depuis un compose
services:
applicationABC:
build:
context: https://github.com/user/applicationABC.git
dockerfile: Dockerfile
container_name: applicationABC
restart: always
ports:
- 8080:8080
Mais dans ce cas la mise à jour automatisée via WatchTower ne fonctionne pas puisqu’il n’y a pas d’image à aller chercher.
labels:
- com.centurylinklabs.watchtower.enable=true
Du coup voici une solution de contournement, simple et surtout qui n’implique pas d’outil tiers ou de cloner un dépôt GitHub et faire/tenir à jour un package moi-même.
Ce bout de code va checker les commits d’un dépôt GitHub à intervalles réguliers et, au besoin, construire un container à jour localement et relancer le tout.
Avec notification Discord, parce que j’aime ça.
applicationABC-autoupdate:
image: alpine:latest
container_name: applicationABC-autoupdate
restart: always
environment:
GITHUB_REPO: https://github.com/user/applicationABC.git
DISCORD_WEBHOOK: https://canary.discord.com/api/webhooks/xxx/xxx
POLL_INTERVAL: 172800 # secondes
SERVICE_NAME: applicationABC
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /tmp:/repo
command: >
sh -c "
apk add --no-cache git bash curl docker-cli jq &&
mkdir -p /repo &&
cd /repo &&
git clone --depth 1 \$GITHUB_REPO . || true &&
REPO_NAME=\$(basename -s .git \$GITHUB_REPO) &&
DEFAULT_BRANCH=\$(curl -s https://api.github.com/repos/\$(echo \$GITHUB_REPO | sed 's|.*/||;s|.git||') | jq -r .default_branch) &&
git fetch origin \$DEFAULT_BRANCH &&
git checkout \$DEFAULT_BRANCH &&
LAST_COMMIT=\$(git rev-parse HEAD) &&
while true; do
git fetch origin \$DEFAULT_BRANCH &&
NEW_COMMIT=\$(git rev-parse origin/\$DEFAULT_BRANCH) &&
if [ \"\$NEW_COMMIT\" != \"\$LAST_COMMIT\" ]; then
echo \"[$(date)] Nouveau commit détecté sur \$DEFAULT_BRANCH, rebuild...\"
git reset --hard origin/\$DEFAULT_BRANCH &&
docker compose -f /repo/docker-compose.yml build \$SERVICE_NAME &&
docker compose -f /repo/docker-compose.yml up -d \$SERVICE_NAME &&
REPO_LINK=\$GITHUB_REPO &&
COMMIT_LINK=\"\$GITHUB_REPO/commit/\$NEW_COMMIT\" &&
curl -H 'Content-Type: application/json' -X POST -d '{\"content\": \"\$REPO_NAME mis à jour automatiquement !\nBranche : \$DEFAULT_BRANCH\nCommit : \$NEW_COMMIT\nDépôt : <\$REPO_LINK|\$REPO_NAME>\nLien du commit : <\$COMMIT_LINK|voir commit>\"}' \$DISCORD_WEBHOOK &&
LAST_COMMIT=\$NEW_COMMIT
else
echo \"[$(date)] Aucun changement sur \$DEFAULT_BRANCH.\"
fi
sleep \$POLL_INTERVAL
done
"
Le travail est effectué dans le dossier temporaire.
Il suffit d’éditer les variables voire le nom du container, histoire de faire propre
applicationABC-autoupdate:
image: alpine:latest
container_name: applicationABC-autoupdate
restart: always
environment:
GITHUB_REPO: https://github.com/user/applicationABC.git
DISCORD_WEBHOOK: https://canary.discord.com/api/webhooks/xxx/xxx
POLL_INTERVAL: 172800 # secondes
SERVICE_NAME: applicationABC
Attention, la variable SERVICE_NAME doit être le nom exact du service à reconstruire/relancer
services:
applicationABC:
build:
context: https://github.com/user/applicationABC.git
dockerfile: Dockerfile
container_name: applicationABC
restart: always
ports:
- 8080:8080
![]()
-
- GitHub - Stirling-Tools/Stirling-PDF: #1 Locally hosted web application that allows you to perform various operations on PDF files
GitHub - Stirling-Tools/Stirling-PDF: #1 Locally hosted web application that allows you to perform various operations on PDF files
![]()
Stirling-PDF is a robust, locally hosted web-based PDF manipulation tool using Docker. It enables you to carry out various operations on PDF files, including splitting, merging, converting, reorganizing, adding images, rotating, compressing, and more. This locally hosted web application has evolved to encompass a comprehensive set of features, addressing all your PDF requirements.
— Permalien
Pulse : monitoring Docker (et Proxmox)
Merci Holaf pour la découverte.
Je n’ai plus de Proxmox depuis des années à la maison, je le teste avec Docker : Ubuntu, Synology et UNRAiD.
Ça fait penser à Beszel mais en plus puissant et complet bien entendu.
Pulse s’utilise en toute logique avec un serveur et des agents. Le tout s’installe en Docker ou en dur.
C’est très musclé et sécurisé, ça permet la découverte de réseaux pour ajouter des nodes Proxmox notamment. Je l’utilise de manière très simple pour ce test :
services:
pulse:
image: rcourtman/pulse:latest
container_name: pulse_serveur
ports:
- 7655:7655
volumes:
- /mnt/user/appdata/pulse:/data
restart: always
On peut ensuite définir un compte d’accès



Je souhaite ajouter des clients Docker

Il faudra pour ça générer un token par client


Et tout est ensuite expliqué pour l’installer ou le retirer. C’est très bien fait.

Mais pour ma machine sous UNRAiD je préfère passer par un container Docker
docker run -d \
--name pulse-docker-agent \
-e PULSE_URL="http://192.168.0.195:7655" \
-e PULSE_TOKEN="a297b11d70d16c15e4eb9241ace555a19bff4279c98ffaa92de5bd9d0bc9bab7" \
-e PULSE_TARGETS="http://192.168.0.195:7655|a297b11d70d16c15e4eb9241ace555a19bff4279c98ffaa92de5bd9d0bc9bab7" \
-v /var/run/docker.sock:/var/run/docker.sock \
--restart always \
ghcr.io/rcourtman/pulse-docker-agent:latest
Et je l’ai tout de suite dans ma liste de clients



Pour un NAS Synology je passe aussi par Docker. En revanche je suis leur recommandation pour ajouter un client sur la machine Ubuntu.
curl -fsSL http://192.168.0.195:7655/install-docker-agent.sh | bash -s -- --url http://192.168.0.195:7655 --token bc6f2c3e562d5c030a1b2b925a6f145050e214359542b3670a79a4a94a971c18
root@StreamBox:/home/aerya# curl -fsSL http://192.168.0.195:7655/install-docker-agent.sh | bash -s -- --url http://192.168.0.195:7655 --token bc6f2c3e562d5c030a1b2b925a6f145050e214359542b3670a79a4a94a971c18
== Pulse Docker Agent Installer ==
[INFO] Primary Pulse URL : http://192.168.0.195:7655
[INFO] Install path : /usr/local/bin/pulse-docker-agent
[INFO] Log directory : /var/log/pulse-docker-agent
[INFO] Reporting interval: 30s
[INFO] API token : provided
[INFO] Docker host ID : cf13d13b-a0e2-4bc6-b755-2535f80b4932
[INFO] Targets:
[INFO] • http://192.168.0.195:7655
[INFO] Downloading agent binary
/usr/local/bin/pulse-docker-agent 100%[=======================================================================================================================================================================================================================================>] 6.85M --.-KB/s in 0.03s
[ OK ] Agent binary installed
[ OK ] Cleared any previous stop block for host
== Configuring systemd service ==
[ OK ] Wrote unit file: /etc/systemd/system/pulse-docker-agent.service
[INFO] Starting service
Created symlink /etc/systemd/system/multi-user.target.wants/pulse-docker-agent.service → /etc/systemd/system/pulse-docker-agent.service.
== Installation complete ==
[INFO] Agent service enabled and started
[INFO] Check status : systemctl status pulse-docker-agent
[INFO] Follow logs : journalctl -u pulse-docker-agent -f
[INFO] Host visible in Pulse : ~30 seconds
Et j’ai bien mes 3 clients


Pulse est un outil sécurisé, très simple, très beau, trés complet, très léger. J’adopte !
![]()
Pulse : Le monitoring Proxmox qui ne perd pas le rythme
GitHub - TibixDev/winboat: Run Windows apps on 🐧 Linux with ✨ seamless integration
Install without docker | Tianji
Use docker to install Tianji is best way which you dont need consider about enviroment problem.
— Permalien
Install without docker | Tianji
Use docker to install Tianji is best way which you dont need consider about enviroment problem.
— Permalien