diff --git a/docker-compose.yml b/docker-compose.yml index bdde356..2ff24d1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,14 +1,11 @@ -version: "3.8" - services: nginx: image: hybula/lookingglass-nginx:1 container_name: lg-nginx build: - context: docker/nginx - dockerfile: Dockerfile - ports: - - "80:80" + context: . + dockerfile: docker/nginx/Dockerfile + network_mode: host restart: unless-stopped php-fpm: @@ -17,6 +14,7 @@ services: build: context: . dockerfile: docker/php-fpm/Dockerfile + network_mode: host restart: unless-stopped environment: # For a better reference as to what these variables do, check out 'config.dist.php' or 'docker/php-fpm/src/config.php'. @@ -39,8 +37,7 @@ services: iperf3: image: networkstatic/iperf3:latest container_name: lg-iperf3 - ports: - - "5201:5201" + network_mode: host command: -s tty: true stdin_open: true diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index c95737e..3d70b27 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -41,7 +41,7 @@ http { location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass php-fpm:9000; + fastcgi_pass localhost:9000; fastcgi_index index.php; include fastcgi.conf; fastcgi_buffering on; diff --git a/docker/php-fpm/Dockerfile b/docker/php-fpm/Dockerfile index 8ba5f8a..6fdeb39 100644 --- a/docker/php-fpm/Dockerfile +++ b/docker/php-fpm/Dockerfile @@ -1,7 +1,7 @@ FROM php:8.1-fpm-bullseye RUN apt-get update && \ - apt-get --no-install-recommends -y install iputils-ping mtr traceroute && \ + apt-get --no-install-recommends -y install iputils-ping mtr traceroute iproute2 && \ rm -rf /var/lib/apt/lists/* WORKDIR /var/www/html