From e0776dfffdc1ec5bf56fc94621a74812816527db Mon Sep 17 00:00:00 2001 From: Administrator Date: Mon, 15 Aug 2022 16:23:40 +0300 Subject: [PATCH] postgres --- .deploy/deploy-dev.yaml | 15 +++++++++++++++ .deploy/deploy-prod.yaml | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.deploy/deploy-dev.yaml b/.deploy/deploy-dev.yaml index 49afa6f..1051f41 100644 --- a/.deploy/deploy-dev.yaml +++ b/.deploy/deploy-dev.yaml @@ -9,6 +9,21 @@ services: deploy: mode: replicated replicas: 1 + restart_policy: + condition: any + placement: + constraints: [node.role == manager] + update_config: + parallelism: 1 + order: start-first + postgres: + image: postgres + volumes: + - /sprint-data/postgres-data:/var/lib/postgresql/data + ports: + - "5432:5432" + deploy: + mode: replicated restart_policy: condition: any placement: diff --git a/.deploy/deploy-prod.yaml b/.deploy/deploy-prod.yaml index 4c3a3e4..024fb91 100644 --- a/.deploy/deploy-prod.yaml +++ b/.deploy/deploy-prod.yaml @@ -15,4 +15,19 @@ services: constraints: [node.role == manager] update_config: parallelism: 1 - order: start-first \ No newline at end of file + order: start-first + postgres: + image: postgres + volumes: + - /sprint-data/postgres-data:/var/lib/postgresql/data + ports: + - "5432:5432" + deploy: + mode: replicated + restart_policy: + condition: any + placement: + constraints: [node.role == manager] + update_config: + parallelism: 1 + order: start-first