Delete tests/openpanel_docker.sh

This commit is contained in:
Stefan Pejcic 2024-11-06 13:19:44 +01:00 committed by GitHub
parent b360633851
commit efb6dd8522
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,37 +0,0 @@
#!/bin/bash
IMAGE_NAME="openpanel"
REPOSITORY_IMG_NAME="openpanel/openpanel"
TAG="latest"
echo "Stopping existing OpenPanel container"
cd /root && docker compose down openpanel
echo "Deleting existing image "
docker image rm $IMAGE_NAME:$TAG
echo "Building the image..."
cd /root/2083/
cp -r /usr/local/admin/scripts /root/2083/scripts
docker build -t $IMAGE_NAME:$TAG .
if [ $? -ne 0 ]; then
echo "Error: Docker image build failed."
exit 1
fi
echo "Docker image built successfully."
echo "Starting container for testing..."
cd /root && docker compose up -d openpanel
sleep 5
echo "Testing the Flask app..."
curl -f http://localhost:2083 || {
echo "Error: Flask app did not start correctly."
cd /root && docker compose down openpanel
exit 1
}
echo "Flask app is running successfully in Docker."