feat: add deployment configurations for Jellyfin and ESPHome services

This commit is contained in:
2026-04-02 20:25:15 +08:00
parent c27fee72ba
commit 1742641296
2 changed files with 41 additions and 0 deletions
+15
View File
@@ -191,5 +191,20 @@ deploy-nextcloud: pull
set +a ;\
docker stack deploy --compose-file ./swarm/nextcloud.yml nextcloud ;\
}
deploy-jellyfin: pull
{ \
echo "Deploying the jellyfin stack..." ;\
set -a ;\
. ./swarm/.env ;\
set +a ;\
docker stack deploy --compose-file ./swarm/jellyfin.yml jellyfin ;\
}
deploy-esphome: pull
{ \
echo "Deploying the esphome stack..." ;\
set -a ;\
. ./swarm/.env ;\
set +a ;\ docker stack deploy --compose-file ./swarm/esphome.yml esphome ;\
}
# git submodule update --init --recursive
+26
View File
@@ -0,0 +1,26 @@
services:
esphome:
container_name: esphome
image: ghcr.io/esphome/esphome
environment:
- USERNAME=${ESPHOME_USERNAME}
- PASSWORD=${ESPHOME_PASSWORD}
volumes:
- /var/data/esphome/config:/config
- /etc/localtime:/etc/localtime:ro
restart: always
privileged: true
network_mode: host
deploy:
# placement:
# constraints:
# - node.labels.esphome.esphome_config == true
labels:
- traefik.enable=true
- traefik.swarm.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.routers.esphome.entrypoints=https
- traefik.http.routers.esphome.rule=Host(`esphome.${DOMAIN}`)
- traefik.http.routers.esphome.tls.certresolver=le
- traefik.http.routers.esphome.service=esphome_app
- traefik.http.services.esphome_app.loadbalancer.server.port=6052