From 9a55e72cf4684934e270bdc8e326d71d01c0d0f3 Mon Sep 17 00:00:00 2001 From: benjamin Oguntoye Date: Wed, 31 Aug 2022 22:57:03 +0300 Subject: [PATCH] v1 --- docker-compose-build.yaml | 6 +++--- docker-compose.yaml | 18 +++++++++--------- udagram-api-feed/backend-feed-deployment.yaml | 9 ++++++++- udagram-api-user/backend-user-deployment.yaml | 9 ++++++++- udagram-frontend/frontend-deployment.yaml | 2 +- .../reverseproxy-deployment.yaml | 9 ++++++++- 6 files changed, 37 insertions(+), 16 deletions(-) diff --git a/docker-compose-build.yaml b/docker-compose-build.yaml index 19bc989..e6fb251 100644 --- a/docker-compose-build.yaml +++ b/docker-compose-build.yaml @@ -3,15 +3,15 @@ services: reverseproxy: build: context: ./udagram-reverseproxy - image: reverseproxy + image: reverseproxy:latest backend_user: build: context: ./udagram-api-user - image: udagram-api-user + image: udagram-api-user:latest backend_feed: build: context: ./udagram-api-feed - image: udagram-api-feed + image: udagram-api-feed:latest frontend: build: context: ./udagram-frontend diff --git a/docker-compose.yaml b/docker-compose.yaml index 5bf8dc1..8d84f82 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ version: "3" services: reverseproxy: - image: reverseproxy + image: reverseproxy:latest ports: - 8080:8080 restart: always @@ -9,28 +9,28 @@ services: - backend-user - backend-feed backend-user: - image: udagram-api-user + image: udagram-api-user:latest environment: POSTGRES_USERNAME: $POSTGRES_USERNAME - POSTGRES_PASSWORD: $POSTGRES_PASSWORD - POSTGRES_DB: $POSTGRES_DB + POSTGRES_PASSWORD: $POSTGRES_PASSWORD + POSTGRES_DB: $POSTGRES_DB POSTGRES_HOST: $POSTGRES_HOST - AWS_REGION: $AWS_REGION - AWS_PROFILE: $AWS_PROFILE + AWS_REGION: $AWS_REGION + AWS_PROFILE: $AWS_PROFILE AWS_BUCKET: $AWS_BUCKET JWT_SECRET: $JWT_SECRET URL: "http://localhost:8100" backend-feed: - image: udagram-api-feed + image: udagram-api-feed:latest volumes: - $HOME/.aws:/root/.aws environment: POSTGRES_USERNAME: $POSTGRES_USERNAME - POSTGRES_PASSWORD: $POSTGRES_PASSWORD + POSTGRES_PASSWORD: $POSTGRES_PASSWORD POSTGRES_DB: $POSTGRES_DB POSTGRES_HOST: $POSTGRES_HOST AWS_REGION: $AWS_REGION - AWS_PROFILE: $AWS_PROFILE + AWS_PROFILE: $AWS_PROFILE AWS_BUCKET: $AWS_BUCKET JWT_SECRET: $JWT_SECRET URL: "http://localhost:8100" diff --git a/udagram-api-feed/backend-feed-deployment.yaml b/udagram-api-feed/backend-feed-deployment.yaml index a2a1a50..fb029fd 100644 --- a/udagram-api-feed/backend-feed-deployment.yaml +++ b/udagram-api-feed/backend-feed-deployment.yaml @@ -16,9 +16,16 @@ spec: spec: containers: - name: docker-kubernates - image: jlord31/udagram-api-feed + image: jlord31/udagram-api-feed:v1 ports: - containerPort: 8080 + resources: + requests: + memory: "150Mi" + limits: + memory: "300Mi" + command: ["stress"] + args: ["--vm", "1", "--vm-bytes", "250M", "--vm-hang", "1"] env: - name: AWS_USER valueFrom: diff --git a/udagram-api-user/backend-user-deployment.yaml b/udagram-api-user/backend-user-deployment.yaml index 0426f03..f166a56 100644 --- a/udagram-api-user/backend-user-deployment.yaml +++ b/udagram-api-user/backend-user-deployment.yaml @@ -16,9 +16,16 @@ spec: spec: containers: - name: docker-kubernates - image: jlord31/udagram-user-feed + image: jlord31/udagram-api-user:v1 ports: - containerPort: 8080 + resources: + requests: + memory: "150Mi" + limits: + memory: "300Mi" + command: ["stress"] + args: ["--vm", "1", "--vm-bytes", "250M", "--vm-hang", "1"] env: - name: AWS_USER valueFrom: diff --git a/udagram-frontend/frontend-deployment.yaml b/udagram-frontend/frontend-deployment.yaml index d16a8d6..c1acc26 100644 --- a/udagram-frontend/frontend-deployment.yaml +++ b/udagram-frontend/frontend-deployment.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: docker-kubernates - image: jlord31/udagram-frontend + image: jlord31/udagram-frontend:v1 ports: - containerPort: 8100 env: diff --git a/udagram-reverseproxy/reverseproxy-deployment.yaml b/udagram-reverseproxy/reverseproxy-deployment.yaml index ee4f559..174bbbd 100644 --- a/udagram-reverseproxy/reverseproxy-deployment.yaml +++ b/udagram-reverseproxy/reverseproxy-deployment.yaml @@ -16,9 +16,16 @@ spec: spec: containers: - name: docker-kubernates - image: jlord31/reverseproxy + image: jlord31/reverseproxy:v1 ports: - containerPort: 8080 + resources: + requests: + memory: "150Mi" + limits: + memory: "300Mi" + command: ["stress"] + args: ["--vm", "1", "--vm-bytes", "250M", "--vm-hang", "1"] env: - name: AWS_USER valueFrom: