From 022c2ea5dec5c86a4b367c89fd2f27dca33791c2 Mon Sep 17 00:00:00 2001 From: eroncero Date: Mon, 4 Aug 2025 09:47:48 +0200 Subject: [PATCH] Better vars --- .env | 22 +++++++++++++++++----- docker-compose.yaml | 11 ++++++++--- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.env b/.env index 3cdf404..84d6556 100644 --- a/.env +++ b/.env @@ -1,5 +1,17 @@ -HOST_HTTP_PORT=80 -HOST_HTTPS_PORT=443 -NGINX_HTTP_PORT=8888 -NGINX_HTTPS_PORT=8843 -PHP_VERSIONS=7.2 7.1 # Set this without quotes! +# IPv4 +NGINX_HTTP_IPV4_HOST=127.0.0.1 +NGINX_HTTP_IPV4_PORT=8888 +NGINX_HTTPS_IPV4_HOST=127.0.0.1 +NGINX_HTTPS_IPV4_PORT=8843 + +# IPv6 +NGINX_HTTP_IPV6_HOST=::1 +NGINX_HTTP_IPV6_PORT=8888 +NGINX_HTTPS_IPV6_HOST=::1 +NGINX_HTTPS_IPV6_PORT=8843 + +# Container Ports (constant) +NGINX_CONTAINER_HTTP_PORT=80 +NGINX_CONTAINER_HTTPS_PORT=443 + +PHP_VERSIONS= # Set this without quotes! ex: 8.1 7.1 7.3 diff --git a/docker-compose.yaml b/docker-compose.yaml index f9d0b1f..05d3c9b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,9 +1,14 @@ services: nginx-srv: - image: eroncero/nginx-srv + image: eroncero/nginx-srv:latest + build: + context: ./nginx-srv + dockerfile: Dockerfile ports: - - "127.0.0.1:${NGINX_HTTP_PORT}:${HOST_HTTP_PORT}" - - "[::1]:${NGINX_HTTPS_PORT}:${HOST_HTTPS_PORT}" + - "${NGINX_HTTP_IPV4_HOST}:${NGINX_HTTP_IPV4_PORT}:${NGINX_CONTAINER_HTTP_PORT}" + - "${NGINX_HTTP_IPV6_HOST}:${NGINX_HTTP_IPV6_PORT}:${NGINX_CONTAINER_HTTP_PORT}" + - "${NGINX_HTTPS_IPV4_HOST}:${NGINX_HTTPS_IPV4_PORT}:${NGINX_CONTAINER_HTTPS_PORT}" + - "${NGINX_HTTPS_IPV6_HOST}:${NGINX_HTTPS_IPV6_PORT}:${NGINX_CONTAINER_HTTPS_PORT}" restart: unless-stopped volumes: - ./nginx-srv/sites-available:/etc/nginx/sites-available