mirror of
https://github.com/fabriziosalmi/patterns.git
synced 2025-12-17 17:55:48 +00:00
Update test_docker.yml
This commit is contained in:
parent
daeb6d2048
commit
4eccf10943
50
.github/workflows/test_docker.yml
vendored
50
.github/workflows/test_docker.yml
vendored
@ -58,32 +58,32 @@ jobs:
|
|||||||
sudo docker pull haproxy:latest
|
sudo docker pull haproxy:latest
|
||||||
sudo docker pull traefik:latest
|
sudo docker pull traefik:latest
|
||||||
|
|
||||||
- name: Validate Nginx configuration
|
# - name: Validate Nginx configuration
|
||||||
run: |
|
# run: |
|
||||||
echo "Validating Nginx configuration..."
|
# echo "Validating Nginx configuration..."
|
||||||
for file in waf_patterns/nginx/*.conf; do
|
# for file in waf_patterns/nginx/*.conf; do
|
||||||
echo "Validating $file..."
|
# echo "Validating $file..."
|
||||||
sudo docker run --rm -v $(pwd)/waf_patterns/nginx:/etc/nginx/conf.d:ro nginx nginx -t
|
# sudo docker run --rm -v $(pwd)/waf_patterns/nginx:/etc/nginx/conf.d:ro nginx nginx -t
|
||||||
if [ $? -ne 0 ]; then
|
# if [ $? -ne 0 ]; then
|
||||||
echo "Error: Validation failed for $file"
|
# echo "Error: Validation failed for $file"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
done
|
# done
|
||||||
|
#
|
||||||
|
# - name: Start Nginx container with WAF rules
|
||||||
|
# run: |
|
||||||
|
# echo "Starting Nginx container..."
|
||||||
|
# sudo docker run -d \
|
||||||
|
# --name nginx-waf \
|
||||||
|
# -p ${{ env.NGINX_PORT }}:80 \
|
||||||
|
# -v $(pwd)/waf_patterns/nginx:/etc/nginx/conf.d \
|
||||||
|
# nginx:latest
|
||||||
|
# echo "Nginx is running on port ${{ env.NGINX_PORT }}."
|
||||||
|
|
||||||
- name: Start Nginx container with WAF rules
|
# - name: Check Nginx container logs
|
||||||
run: |
|
# run: |
|
||||||
echo "Starting Nginx container..."
|
# echo "Checking Nginx container logs..."
|
||||||
sudo docker run -d \
|
# sudo docker logs nginx-waf
|
||||||
--name nginx-waf \
|
|
||||||
-p ${{ env.NGINX_PORT }}:80 \
|
|
||||||
-v $(pwd)/waf_patterns/nginx:/etc/nginx/conf.d \
|
|
||||||
nginx:latest
|
|
||||||
echo "Nginx is running on port ${{ env.NGINX_PORT }}."
|
|
||||||
|
|
||||||
- name: Check Nginx container logs
|
|
||||||
run: |
|
|
||||||
echo "Checking Nginx container logs..."
|
|
||||||
sudo docker logs nginx-waf
|
|
||||||
|
|
||||||
- name: Validate Apache configuration
|
- name: Validate Apache configuration
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user