From a19d75c0dfec0a5df71950b53a7f31b38bc3eb44 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sun, 25 Sep 2022 15:08:41 +0300 Subject: [PATCH] mongo --- .deploy-infra/deploy-dev.yaml | 17 +++++++++++++++++ .deploy-infra/deploy-prod.yaml | 17 +++++++++++++++++ .gitlab-ci.yml | 1 + 3 files changed, 35 insertions(+) diff --git a/.deploy-infra/deploy-dev.yaml b/.deploy-infra/deploy-dev.yaml index 291f83c..5fc5891 100644 --- a/.deploy-infra/deploy-dev.yaml +++ b/.deploy-infra/deploy-dev.yaml @@ -41,6 +41,23 @@ services: parallelism: 1 order: start-first + mongo: + image: mongo + volumes: + - /sprint-data/mongo:/data/db + environment: + ports: + - "27017:27017" + deploy: + mode: replicated + restart_policy: + condition: any + placement: + constraints: [node.role == manager] + update_config: + parallelism: 1 + order: start-first + rabbitmq: image: rabbitmq:3.10.7-management ports: diff --git a/.deploy-infra/deploy-prod.yaml b/.deploy-infra/deploy-prod.yaml index 4d30f91..b23e069 100644 --- a/.deploy-infra/deploy-prod.yaml +++ b/.deploy-infra/deploy-prod.yaml @@ -41,6 +41,23 @@ services: parallelism: 1 order: start-first + mongo: + image: mongo + volumes: + - /sprint-data/mongo:/data/db + environment: + ports: + - "27017:27017" + deploy: + mode: replicated + restart_policy: + condition: any + placement: + constraints: [node.role == manager] + update_config: + parallelism: 1 + order: start-first + rabbitmq: image: rabbitmq:3.10.7-management ports: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1cf191d..166bf1d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ stages: before_script: - docker login -u mathwave -p $DOCKERHUB_PASSWORD - docker network create -d overlay --attachable swarmpit-nginx || true + - mkdir /sprint-data/mongo || true build: stage: build