mirror of
https://github.com/vhaudiquet/homeprod.git
synced 2025-12-18 12:06:05 +00:00
Enable swarm-cd
This commit is contained in:
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -32,8 +32,8 @@ updates:
|
|||||||
- "/docker/personal/syncthing"
|
- "/docker/personal/syncthing"
|
||||||
- "/docker/personal/tandoor"
|
- "/docker/personal/tandoor"
|
||||||
- "/docker/production/alexscript"
|
- "/docker/production/alexscript"
|
||||||
- "/docker/production/semery.fr"
|
- "/docker/production/semeryfr"
|
||||||
- "/docker/production/vhaudiquet.fr"
|
- "/docker/production/vhaudiquetfr"
|
||||||
- "/docker/tools/excalidraw"
|
- "/docker/tools/excalidraw"
|
||||||
- "/docker/tools/hedgedoc"
|
- "/docker/tools/hedgedoc"
|
||||||
- "/docker/tools/notesnook"
|
- "/docker/tools/notesnook"
|
||||||
|
|||||||
@@ -11,4 +11,8 @@ repos:
|
|||||||
entry: generate-dependabot.sh
|
entry: generate-dependabot.sh
|
||||||
language: script
|
language: script
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
- id: generate-docker-swarmcd
|
||||||
|
name: generate docker swarmcd
|
||||||
|
entry: generate-docker-swarmcd.sh
|
||||||
|
language: script
|
||||||
|
pass_filenames: false
|
||||||
|
|||||||
2
.swarmcd/repos.yaml
Normal file
2
.swarmcd/repos.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
homeprod:
|
||||||
|
url: "https://github.com/vhaudiquet/homeprod"
|
||||||
165
.swarmcd/stacks.yaml
Normal file
165
.swarmcd/stacks.yaml
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
gitea-actions:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/gitea-actions/docker-compose.yml
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/home/esphome/docker-compose.yml
|
||||||
|
|
||||||
|
ha-linky:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/home/ha-linky/docker-compose.yml
|
||||||
|
|
||||||
|
home-assistant:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/home/home-assistant/docker-compose.yml
|
||||||
|
|
||||||
|
matter-server:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/home/matter-server/docker-compose.yml
|
||||||
|
|
||||||
|
mosquitto-mqtt:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/home/mosquitto-mqtt/docker-compose.yml
|
||||||
|
|
||||||
|
node-red:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/home/node-red/docker-compose.yml
|
||||||
|
|
||||||
|
zigbee2mqtt:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/home/zigbee2mqtt/docker-compose.yml
|
||||||
|
|
||||||
|
roundcube:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/infrastructure/mail/roundcube/docker-compose.yml
|
||||||
|
|
||||||
|
stalwart:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/infrastructure/mail/stalwart/docker-compose.yml
|
||||||
|
|
||||||
|
traefik:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/infrastructure/network/traefik/docker-compose.yml
|
||||||
|
|
||||||
|
sshportal:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/infrastructure/sshportal/docker-compose.yml
|
||||||
|
|
||||||
|
gramps:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/gramps/docker-compose.yml
|
||||||
|
|
||||||
|
jackett:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/films-series/jackett/docker-compose.yml
|
||||||
|
|
||||||
|
jellyfin:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/films-series/jellyfin/docker-compose.yml
|
||||||
|
|
||||||
|
jellyseerr:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/films-series/jellyseerr/docker-compose.yml
|
||||||
|
|
||||||
|
radarr:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/films-series/radarr/docker-compose.yml
|
||||||
|
|
||||||
|
sonarr:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/films-series/sonarr/docker-compose.yml
|
||||||
|
|
||||||
|
transmission:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/films-series/transmission/docker-compose.yml
|
||||||
|
|
||||||
|
wizarr:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/films-series/wizarr/docker-compose.yml
|
||||||
|
|
||||||
|
navidrome:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/music/navidrome/docker-compose.yml
|
||||||
|
|
||||||
|
tubearchivist:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/media/youtube/tubearchivist/docker-compose.yml
|
||||||
|
|
||||||
|
paperless:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/paperless/docker-compose.yml
|
||||||
|
|
||||||
|
radicale:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/radicale/docker-compose.yml
|
||||||
|
|
||||||
|
syncthing:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/syncthing/docker-compose.yml
|
||||||
|
|
||||||
|
tandoor:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/personal/tandoor/docker-compose.yml
|
||||||
|
|
||||||
|
alexscript:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/production/alexscript/docker-compose.yml
|
||||||
|
|
||||||
|
semeryfr:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/production/semeryfr/docker-compose.yml
|
||||||
|
|
||||||
|
vhaudiquetfr:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/production/vhaudiquetfr/docker-compose.yml
|
||||||
|
|
||||||
|
excalidraw:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/tools/excalidraw/docker-compose.yml
|
||||||
|
|
||||||
|
hedgedoc:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/tools/hedgedoc/docker-compose.yml
|
||||||
|
|
||||||
|
notesnook:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/tools/notesnook/docker-compose.yml
|
||||||
|
|
||||||
|
stirling-pdf:
|
||||||
|
repo: homeprod
|
||||||
|
branch: main
|
||||||
|
compose_file: docker/tools/stirling-pdf/docker-compose.yml
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ Running as single-node Proxmox
|
|||||||
| <img width=32 src="https://avatars.githubusercontent.com/u/12724356"><img width=32 src="https://avatars.githubusercontent.com/u/40275816"> | Repository applications | Gitea, Harbor to store code and images |
|
| <img width=32 src="https://avatars.githubusercontent.com/u/12724356"><img width=32 src="https://avatars.githubusercontent.com/u/40275816"> | Repository applications | Gitea, Harbor to store code and images |
|
||||||
| <img width=30 src="https://buildpath.win/_ipx/w_60&f_webp/buildpath-high-resolution-logo-transparent.png"> <img width=32 src="https://avatars.githubusercontent.com/u/13844975"> | Production applications | Personal applications running on the server |
|
| <img width=30 src="https://buildpath.win/_ipx/w_60&f_webp/buildpath-high-resolution-logo-transparent.png"> <img width=32 src="https://avatars.githubusercontent.com/u/13844975"> | Production applications | Personal applications running on the server |
|
||||||
|
|
||||||
Debian and docker / docker swarm are deployed by Terraform ; then the stacks are deployed by hand for now, looking at something like [SwarmCD](https://github.com/m-adawi/swarm-cd) for the future.
|
Debian and docker / docker swarm are deployed by Terraform, which also deploys [SwarmCD](https://github.com/m-adawi/swarm-cd) ; then the stacks are deployed by SwarmCD.
|
||||||
|
|
||||||
#### Kubernetes one-node cluster
|
#### Kubernetes one-node cluster
|
||||||
|
|
||||||
|
|||||||
29
docker/home/n8n/docker-compose.yaml
Normal file
29
docker/home/n8n/docker-compose.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
services:
|
||||||
|
n8n:
|
||||||
|
image: docker.n8n.io/n8nio/n8n
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Paris
|
||||||
|
- N8N_SECURE_COOKIE=false
|
||||||
|
ports:
|
||||||
|
- "5678"
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- proxy
|
||||||
|
volumes:
|
||||||
|
- data:/data
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.n8n.rule=Host(`n8n.lan`)"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
data:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: 'none'
|
||||||
|
o: 'bind'
|
||||||
|
device: '/app/n8n/data'
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
name: proxy
|
||||||
30
generate-docker-swarmcd.sh
Executable file
30
generate-docker-swarmcd.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Create .swarmcd directory if needed
|
||||||
|
if [ ! -d .swarmcd ]; then
|
||||||
|
mkdir -p .swarmcd
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmpfile=$(mktemp)
|
||||||
|
|
||||||
|
# Make sure to cleanup our temp file on any kind of exit
|
||||||
|
trap 'rm -f "$tmpfile"' EXIT
|
||||||
|
|
||||||
|
# Find and sort all docker-compose.yml directories
|
||||||
|
find docker -name 'docker-compose.yml' -print0 \
|
||||||
|
| xargs -0 -n1 dirname \
|
||||||
|
| sed 's|^\./||' \
|
||||||
|
| sort \
|
||||||
|
| while read -r dir; do
|
||||||
|
file="$dir/docker-compose.yml"
|
||||||
|
name=$(basename "$dir")
|
||||||
|
echo -e "$name:\n repo: homeprod\n branch: main\n compose_file: $file\n" >> "$tmpfile"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Overwrite file on change
|
||||||
|
if ! [ -f .swarmcd/stacks.yaml ] || ! cmp -s "$tmpfile" .swarmcd/stacks.yaml; then
|
||||||
|
mv "$tmpfile" .swarmcd/stacks.yaml
|
||||||
|
echo "Updated .swarmcd/stacks.yaml!"
|
||||||
|
else
|
||||||
|
echo "No changes to .swarmcd/stacks.yaml."
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user