Skip to content

Commit

Permalink
Add deploy&run script
Browse files Browse the repository at this point in the history
  • Loading branch information
CosminLazar committed May 23, 2024
1 parent 4d76519 commit 966ebf2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/deploy-latest-and-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

image_name="untagged6785/ha-mitaffald"
container_name="ha-mitaffald"

docker pull $image_name:latest

echo "Stopping container $container_name"
docker stop $container_name || true

echo "Removing container $container_name"
docker rm $container_name || true

echo "Starting new container"
docker run -d --name $container_name -e affaldvarme.address.id -e mqtt.username -e mqtt.password --restart=on-failure:5 $image_name:latest

0 comments on commit 966ebf2

Please sign in to comment.