reids-volume

This commit is contained in:
Administrator 2022-10-25 00:30:32 +03:00
parent 24c865dea2
commit d4aedb4208
3 changed files with 10 additions and 0 deletions

View File

@ -76,6 +76,8 @@ services:
redis: redis:
image: redis:alpine3.16 image: redis:alpine3.16
volumes:
- /sprint-data/redis:/data
ports: ports:
- "6379:6379" - "6379:6379"
command: redis-server --requirepass $REDIS_PASSWORD_DEV command: redis-server --requirepass $REDIS_PASSWORD_DEV
@ -83,6 +85,8 @@ services:
mode: replicated mode: replicated
restart_policy: restart_policy:
condition: any condition: any
placement:
constraints: [node.role == manager]
update_config: update_config:
parallelism: 1 parallelism: 1
order: start-first order: start-first

View File

@ -76,6 +76,8 @@ services:
redis: redis:
image: redis:alpine3.16 image: redis:alpine3.16
volumes:
- /sprint-data/redis:/data
ports: ports:
- "6379:6379" - "6379:6379"
command: redis-server --requirepass $REDIS_PASSWORD_PROD command: redis-server --requirepass $REDIS_PASSWORD_PROD
@ -83,6 +85,8 @@ services:
mode: replicated mode: replicated
restart_policy: restart_policy:
condition: any condition: any
placement:
constraints: [node.role == manager]
update_config: update_config:
parallelism: 1 parallelism: 1
order: start-first order: start-first

View File

@ -10,7 +10,9 @@ stages:
- docker network create -d overlay --attachable common-infra-nginx || true - docker network create -d overlay --attachable common-infra-nginx || true
- mkdir /sprint-data/mongo || true - mkdir /sprint-data/mongo || true
- mkdir /sprint-data/grafana || true - mkdir /sprint-data/grafana || true
- mkdir /sprint-data/redis || true
- chmod 777 /sprint-data/grafana - chmod 777 /sprint-data/grafana
- chmod 777 /sprint-data/redis
build: build:
stage: build stage: build