ci: use --env-file for persistent env vars in deploy
Some checks failed
Deploy / deploy (push) Failing after 0s

This commit is contained in:
Cosmo
2026-04-22 13:23:46 +00:00
parent fd86034217
commit 675cdd4883
2 changed files with 5 additions and 2 deletions

View File

@@ -20,5 +20,5 @@ jobs:
docker build -t smart-home-tablet:latest . docker build -t smart-home-tablet:latest .
docker stop tablet-yfh53kixpwkjlo4zibglx4n2 || true docker stop tablet-yfh53kixpwkjlo4zibglx4n2 || true
docker rm tablet-yfh53kixpwkjlo4zibglx4n2 || true docker rm tablet-yfh53kixpwkjlo4zibglx4n2 || true
docker run -d --name tablet-yfh53kixpwkjlo4zibglx4n2 --network coolify -p 3006:3000 --restart unless-stopped --label 'traefik.enable=true' --label 'traefik.http.routers.tablet.rule=Host(`tablet.digital-home.site`)' --label 'traefik.http.routers.tablet.entrypoints=https' --label 'traefik.http.routers.tablet.tls=true' --label 'traefik.http.routers.tablet.tls.certresolver=letsencrypt' --label 'traefik.http.services.tablet.loadbalancer.server.port=3000' -e HA_URL=http://192.168.31.110:8123 -e NEXT_PUBLIC_APP_URL=https://tablet.digital-home.site smart-home-tablet:latest docker run -d --name tablet-yfh53kixpwkjlo4zibglx4n2 --network coolify -p 3006:3000 --restart unless-stopped --label traefik.enable=true --label 'traefik.http.routers.tablet.rule=Host(`tablet.digital-home.site`)' --label traefik.http.routers.tablet.entrypoints=https --label traefik.http.routers.tablet.tls=true --label traefik.http.routers.tablet.tls.certresolver=letsencrypt --label traefik.http.services.tablet.loadbalancer.server.port=3000 --env-file /opt/digital-home/smart-home-tablet/.tablet.env smart-home-tablet:latest
echo 'Deploy done' echo 'Done'

3
.tablet.env Normal file
View File

@@ -0,0 +1,3 @@
HA_URL=http://192.168.31.110:8123
HA_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIzNDQyMjYwYjc4ODY0ZGFlODI5YjAxMjBjNjA1NTQ2ZCIsImlhdCI6MTc3Njg1MTgwOSwiZXhwIjoyMDkyMjExODA5fQ.U_Y-SzCPpq2L6Bj8-gwxZAfGOYBjrCGhhNLt89-eNjs
NEXT_PUBLIC_APP_URL=https://tablet.digital-home.site