From d4aedb42081660e7bb6e509a67b1cd091bcaaae6 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 25 Oct 2022 00:30:32 +0300 Subject: [PATCH] reids-volume --- .deploy-infra/deploy-dev.yaml | 4 ++++ .deploy-infra/deploy-prod.yaml | 4 ++++ .gitlab-ci.yml | 2 ++ 3 files changed, 10 insertions(+) diff --git a/.deploy-infra/deploy-dev.yaml b/.deploy-infra/deploy-dev.yaml index 3fa44d8..a370d41 100644 --- a/.deploy-infra/deploy-dev.yaml +++ b/.deploy-infra/deploy-dev.yaml @@ -76,6 +76,8 @@ services: redis: image: redis:alpine3.16 + volumes: + - /sprint-data/redis:/data ports: - "6379:6379" command: redis-server --requirepass $REDIS_PASSWORD_DEV @@ -83,6 +85,8 @@ services: mode: replicated restart_policy: condition: any + placement: + constraints: [node.role == manager] update_config: parallelism: 1 order: start-first diff --git a/.deploy-infra/deploy-prod.yaml b/.deploy-infra/deploy-prod.yaml index 305ef27..4f7a0b3 100644 --- a/.deploy-infra/deploy-prod.yaml +++ b/.deploy-infra/deploy-prod.yaml @@ -76,6 +76,8 @@ services: redis: image: redis:alpine3.16 + volumes: + - /sprint-data/redis:/data ports: - "6379:6379" command: redis-server --requirepass $REDIS_PASSWORD_PROD @@ -83,6 +85,8 @@ services: mode: replicated restart_policy: condition: any + placement: + constraints: [node.role == manager] update_config: parallelism: 1 order: start-first diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e69cee..84e68c6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,9 @@ stages: - docker network create -d overlay --attachable common-infra-nginx || true - mkdir /sprint-data/mongo || true - mkdir /sprint-data/grafana || true + - mkdir /sprint-data/redis || true - chmod 777 /sprint-data/grafana + - chmod 777 /sprint-data/redis build: stage: build