From 24c589d3a12c38bad786272281de3ab0beab2e5e Mon Sep 17 00:00:00 2001 From: viveksair Date: Sun, 27 Apr 2025 16:08:21 -0400 Subject: [PATCH 1/5] Update Dockerfile --- staging/https-nginx/Dockerfile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/staging/https-nginx/Dockerfile b/staging/https-nginx/Dockerfile index f58408861..7543f3eeb 100644 --- a/staging/https-nginx/Dockerfile +++ b/staging/https-nginx/Dockerfile @@ -12,13 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM nginx +FROM nginx:latest +# Copy HTML and script files COPY index2.html /usr/share/nginx/html/index2.html -RUN chmod +r /usr/share/nginx/html/index2.html COPY auto-reload-nginx.sh /home/auto-reload-nginx.sh -RUN chmod +x /home/auto-reload-nginx.sh -# install inotify -RUN apt-get update && apt-get install -y inotify-tools +# Set permissions and install inotify-tools in one layer +RUN chmod 644 /usr/share/nginx/html/index2.html && \ + chmod +x /home/auto-reload-nginx.sh && \ + apt-get update && \ + apt-get install -y --no-install-recommends inotify-tools && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Override at kubernetes deployment template +CMD ["./auto-reload-nginx.sh"] From 1a2a9d93fd115e83a7afb6e12f6ec7d2eb2cb2f0 Mon Sep 17 00:00:00 2001 From: viveksair Date: Mon, 28 Apr 2025 13:32:43 -0400 Subject: [PATCH 2/5] update docker & deploy --- staging/https-nginx/Dockerfile | 2 +- staging/https-nginx/nginx-app.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/staging/https-nginx/Dockerfile b/staging/https-nginx/Dockerfile index 7543f3eeb..a927665d8 100644 --- a/staging/https-nginx/Dockerfile +++ b/staging/https-nginx/Dockerfile @@ -27,5 +27,5 @@ RUN chmod 644 /usr/share/nginx/html/index2.html && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -# Override at kubernetes deployment template +WORKDIR /home CMD ["./auto-reload-nginx.sh"] diff --git a/staging/https-nginx/nginx-app.yaml b/staging/https-nginx/nginx-app.yaml index a5ce0bd37..f5497310e 100644 --- a/staging/https-nginx/nginx-app.yaml +++ b/staging/https-nginx/nginx-app.yaml @@ -37,7 +37,6 @@ spec: containers: - name: nginxhttps image: ymqytw/nginxhttps:1.5 - command: ["/home/auto-reload-nginx.sh"] ports: - containerPort: 443 - containerPort: 80 From 23d0c172603aaede93e9200ff284249123cd3cf9 Mon Sep 17 00:00:00 2001 From: viveksair Date: Mon, 28 Apr 2025 15:11:03 -0400 Subject: [PATCH 3/5] update docker & deploy --- staging/https-nginx/nginx-app.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/https-nginx/nginx-app.yaml b/staging/https-nginx/nginx-app.yaml index f5497310e..745dcd05b 100644 --- a/staging/https-nginx/nginx-app.yaml +++ b/staging/https-nginx/nginx-app.yaml @@ -16,6 +16,7 @@ spec: selector: app: nginx --- + apiVersion: v1 kind: ReplicationController metadata: From 0acffd43aac9f662c5f83026526016ed91425ce7 Mon Sep 17 00:00:00 2001 From: viveksair Date: Sat, 3 May 2025 10:25:33 -0400 Subject: [PATCH 4/5] refactor --- staging/https-nginx/nginx-app.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/https-nginx/nginx-app.yaml b/staging/https-nginx/nginx-app.yaml index 745dcd05b..7d4a45c22 100644 --- a/staging/https-nginx/nginx-app.yaml +++ b/staging/https-nginx/nginx-app.yaml @@ -38,6 +38,7 @@ spec: containers: - name: nginxhttps image: ymqytw/nginxhttps:1.5 + command: ["/home/auto-reload-nginx.sh"] ports: - containerPort: 443 - containerPort: 80 From c14979c11bd3c0f1e7b908e5d5b4c60e86a1a405 Mon Sep 17 00:00:00 2001 From: viveksair Date: Sat, 3 May 2025 10:25:59 -0400 Subject: [PATCH 5/5] refactor --- staging/https-nginx/nginx-app.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/staging/https-nginx/nginx-app.yaml b/staging/https-nginx/nginx-app.yaml index 7d4a45c22..a5ce0bd37 100644 --- a/staging/https-nginx/nginx-app.yaml +++ b/staging/https-nginx/nginx-app.yaml @@ -16,7 +16,6 @@ spec: selector: app: nginx --- - apiVersion: v1 kind: ReplicationController metadata: