fix: use docker rm -f to avoid stop/rm conflict in CI
All checks were successful
Deploy / deploy (push) Successful in 4s
All checks were successful
Deploy / deploy (push) Successful in 4s
This commit is contained in:
@@ -16,25 +16,7 @@ jobs:
|
|||||||
cd /opt/digital-home/smart-home-tablet
|
cd /opt/digital-home/smart-home-tablet
|
||||||
git config --global --add safe.directory /opt/digital-home/smart-home-tablet
|
git config --global --add safe.directory /opt/digital-home/smart-home-tablet
|
||||||
git pull origin main
|
git pull origin main
|
||||||
# BuildKit включён через DOCKER_BUILDKIT=1 — Dockerfile использует
|
|
||||||
# cache mounts для /root/.npm и .next/cache, что ускоряет повторные
|
|
||||||
# сборки в 3-5 раз (npm install не качает заново, next build
|
|
||||||
# пользует incremental TS-cache).
|
|
||||||
docker build -t smart-home-tablet:latest .
|
docker build -t smart-home-tablet:latest .
|
||||||
docker stop tablet-yfh53kixpwkjlo4zibglx4n2 || true
|
docker rm -f 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 --env-file /opt/digital-home/tablet.env -v /opt/digital-home/smart-home-tablet-data:/data 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/tablet.env \
|
|
||||||
-v /opt/digital-home/smart-home-tablet-data:/data \
|
|
||||||
smart-home-tablet:latest
|
|
||||||
echo 'Deploy done'
|
echo 'Deploy done'
|
||||||
|
|||||||
Reference in New Issue
Block a user