Files
Projektarbeit-MYP/packages/reservation-platform/docker/deploy.sh
Till Tomczak 5f2b3df924 Backend aufgeräumt und Steckdosen-Einschaltfunktion behoben
- TAPO_PASSWORD in .env korrigiert (Agent045)
- Unnötige Verzeichnisse entfernt (node_modules, archiv in backend/, etc.)
- .gitignore erstellt um .env-Dateien zu schützen
- Projektstruktur bereinigt (von 1.5MB auf 186KB reduziert)
- Flask Web UI vollständig funktionsfähig

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 00:42:48 +02:00

37 lines
975 B
Bash

#!/bin/bash
# Directory containing the Docker images
IMAGE_DIR="docker/images"
# Load all Docker images from the tar.xz files in the IMAGE_DIR
echo "Loading Docker images from $IMAGE_DIR..."
for image_file in "$IMAGE_DIR"/*.tar.xz; do
if [ -f "$image_file" ]; then
echo "Loading Docker image from $image_file..."
docker load -i "$image_file"
# Check if the image loading was successful
if [ $? -ne 0 ]; then
echo "Error occurred while loading Docker image from $image_file"
exit 1
fi
else
echo "No Docker image tar.xz files found in $IMAGE_DIR."
fi
done
# Execute docker compose
echo "Running docker compose..."
docker compose -f "docker/compose.yml" up -d
# Check if the operation was successful
if [ $? -eq 0 ]; then
echo "Docker compose executed successfully"
else
echo "Error occurred while executing docker compose"
exit 1
fi
echo "Deployment completed successfully"