From 9bf16a3061a47ef29a4bd586f2fc6d4f9f0ec333 Mon Sep 17 00:00:00 2001 From: Yugandharkumar Date: Tue, 28 Jan 2025 16:07:12 +0530 Subject: [PATCH 1/6] Create Dockerfile --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1061f21 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Use the official Python base image +FROM python:3.9-slim + +# Set the working directory inside the container +WORKDIR /app + +# Copy the application code into the container +COPY . /app + +# Install dependencies (if there's a requirements.txt file) +COPY requirements.txt . + +RUN pip install --no-cache-dir -r requirements.txt + +# Set the command and arguments +CMD ["python", "/app/main.py"] From 12072e6b75b49a86551c7477e6bf61f6f669a59f Mon Sep 17 00:00:00 2001 From: Yugandharkumar Date: Tue, 28 Jan 2025 16:08:08 +0530 Subject: [PATCH 2/6] Create requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4b70123 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask==2.2.5 From c3ea5a269efb983b894d280ac07f914da19f6f2d Mon Sep 17 00:00:00 2001 From: Yugandharkumar Date: Tue, 28 Jan 2025 16:16:20 +0530 Subject: [PATCH 3/6] Update Dockerfile --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1061f21..07d7ad8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,12 +5,11 @@ FROM python:3.9-slim WORKDIR /app # Copy the application code into the container -COPY . /app +COPY main.py /app -# Install dependencies (if there's a requirements.txt file) -COPY requirements.txt . +COPY requirements.txt /tmp/ -RUN pip install --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir -r /tmp/requirements.txt # Set the command and arguments CMD ["python", "/app/main.py"] From 9945e5cbd4dbb98a552fdde9d14dfede82cf27d3 Mon Sep 17 00:00:00 2001 From: Yugandharkumar Date: Tue, 28 Jan 2025 16:25:03 +0530 Subject: [PATCH 4/6] Update deployment.yaml --- manifests/deployment.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/manifests/deployment.yaml b/manifests/deployment.yaml index 7e9a34e..3578138 100644 --- a/manifests/deployment.yaml +++ b/manifests/deployment.yaml @@ -15,16 +15,16 @@ spec: containers: - name: main image: python:latest - command: ["python"] - args: ["/app/main.py"] + # command: ["python"] + # args: ["/app/main.py"] ports: - containerPort: 5000 name: http - volumeMounts: - - name: main - mountPath: "/app/main.py" - subPath: "main.py" - volumes: - - name: main - configMap: - name: main + # volumeMounts: + # - name: main + # mountPath: "/app/main.py" + # subPath: "main.py" + # volumes: + # - name: main + # configMap: + # name: main From fecbb3b8e96d786d568ed485af9144b522f09347 Mon Sep 17 00:00:00 2001 From: Yugandharkumar Date: Tue, 28 Jan 2025 16:26:56 +0530 Subject: [PATCH 5/6] Update requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4b70123..044b742 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -Flask==2.2.5 +Flask==3.1.0 +prometheus_client==0.21.1 From 6fd81f99ed74b8fee1fde310da424d95b94ba66a Mon Sep 17 00:00:00 2001 From: yugaa22 Date: Tue, 28 Jan 2025 17:28:26 +0530 Subject: [PATCH 6/6] dora-metrics deployment --- manifests/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/deployment.yaml b/manifests/deployment.yaml index 3578138..77b6be0 100644 --- a/manifests/deployment.yaml +++ b/manifests/deployment.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: main - image: python:latest + image: quay.io/opsmxpublic/dora-metrics:v1 # command: ["python"] # args: ["/app/main.py"] ports: