🚀 fix: correct container name in deployment script logic

This commit is contained in:
2025-02-21 16:03:02 +01:00
parent c3a76c2650
commit afce84dde0

View File

@@ -46,11 +46,13 @@ jobs:
echo "Deploying $CONTAINER_NAME"
if [ "$(docker inspect --format='{{.State.Running}}' "$NEW_CONTAINER_NAME")" = "true" ]; then
if [ "$(docker inspect --format='{{.State.Running}}' "$CONTAINER_NAME")" = "true" ]; then
docker stop "$CONTAINER_NAME" || true
docker rm "$CONTAINER_NAME" || true
fi
docker run -d --name "$CONTAINER_NAME" -p $PORT:3000 "$IMAGE_NAME"
if [ "$(docker inspect --format='{{.State.Running}}' "$CONTAINER_NAME")" = "true" ]; then
echo "Deployment erfolgreich!"
else
echo "Neuer Container konnte nicht gestartet werden!"