#!/bin/bash # Load the Docker images from the tar files echo "Loading Docker images from tar files..." # Load myp-rp image echo "Loading myp-rp image..." docker load -i "docker/myp-rp_latest.tar.xz" # Check if loading the myp-rp image was successful if [ $? -ne 0 ]; then echo "Error occurred while loading myp-rp Docker image" exit 1 fi # Load caddy image echo "Loading caddy image..." docker load -i "docker/caddy.tar.xz" # Check if loading the caddy image was successful if [ $? -ne 0 ]; then echo "Error occurred while loading caddy Docker image" exit 1 fi # 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 "Process completed successfully"