From 8c6449c959a574b407622be0af6f7c4b06d3efb0 Mon Sep 17 00:00:00 2001 From: Nathan Drew <1035229+NaffanDroo@users.noreply.github.com> Date: Thu, 8 Oct 2020 16:44:25 +0100 Subject: [PATCH] Working solution on n1-standard-1 cluster --- Dockerfile | 4 ++-- azure-pipelines.yml | 2 +- deployment.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a05b30c..d41bf50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ RUN useradd -m app USER app WORKDIR /home/app -RUN pip install --user poetry==1.1.0b2 +RUN pip install --user poetry==1.1.0b4 # ======= Final image ======= FROM base @@ -17,4 +17,4 @@ RUN poetry install --no-dev --no-interaction EXPOSE 5000 -CMD poetry run gunicorn --bind 0.0.0.0:5000 --workers 1 --threads 2 main:app \ No newline at end of file +CMD poetry run gunicorn --bind 0.0.0.0:5000 --workers 1 --threads 2 main:app --access-logfile '-' \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 367de48..5b850c1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,7 +33,7 @@ stages: displayName: 'Lock image version in deployment.yaml' inputs: filename: /bin/bash - arguments: '-c "awk ''{gsub(\"DOCKER_IMAGE_NAME\", \"gcr.io/$(DockerImageName):$(Build.BuildId)\", $0); print}'' deployment.yaml > $(build.artifactstagingdirectory)/deployment.yaml"' + arguments: '-c "awk ''{gsub(\"DOCKER_IMAGE_NAME\", \"eu.gcr.io/$(DockerImageName):$(Build.BuildId)\", $0); print}'' deployment.yaml > $(build.artifactstagingdirectory)/deployment.yaml"' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact' inputs: diff --git a/deployment.yaml b/deployment.yaml index a2d078c..4eeb334 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -26,13 +26,13 @@ spec: livenessProbe: tcpSocket: port: 5000 - initialDelaySeconds: 5 + initialDelaySeconds: 15 periodSeconds: 10 readinessProbe: httpGet: tcpSocket: port: 5000 - initialDelaySeconds: 3 + initialDelaySeconds: 15 periodSeconds: 5 resources: limits: