Refactor some lines

This commit is contained in:
Murtadha 2024-07-27 15:31:33 -04:00
parent 88b5743bb7
commit e0679b4582

View file

@ -80,12 +80,11 @@ pipeline:
- echo "Verifying deployment..." - echo "Verifying deployment..."
# Verify the container is running # Verify the container is running
- docker ps | grep frontend || { echo "Container failed to start"; exit 1; } - docker ps | grep frontend || { echo "Container failed to start"; exit 1; }
# Display container logs # Display container logs and test nginx configuration
- docker logs frontend - docker logs frontend
# Test Nginx configuration
- docker exec frontend nginx -t - docker exec frontend nginx -t
# Check Nginx process
- docker exec frontend ps aux | grep nginx - docker exec frontend ps aux | grep nginx
# Check contents of /usr/share/nginx/html in the container # Check contents of /usr/share/nginx/html in the container
- docker exec frontend ls -la /usr/share/nginx/html - docker exec frontend ls -la /usr/share/nginx/html
# Perform a simple HTTP request to check if the server is responding # Perform a simple HTTP request to check if the server is responding