26 lines
609 B
Bash
Executable File
26 lines
609 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Load the Docker image from the tar file
|
|
echo "Loading Docker image from $COMPOSE_FILE..."
|
|
docker load -i "docker/myp-rp_latest.tar.xz"
|
|
|
|
# Check if loading the image was successful
|
|
if [ $? -ne 0 ]; then
|
|
echo "Error occurred while loading Docker image"
|
|
exit 1
|
|
fi
|
|
|
|
# Execute docker compose
|
|
echo "Running docker compose..."
|
|
docker compose -f "$COMPOSE_FILE" 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"
|