From fc0a69a9ed2c4abe3ad65a459c1e9aa166fa7b94 Mon Sep 17 00:00:00 2001 From: emmatveev Date: Sat, 23 Nov 2024 21:05:31 +0300 Subject: [PATCH 1/4] prod --- .deploy-infra/deploy-prod.yaml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.deploy-infra/deploy-prod.yaml b/.deploy-infra/deploy-prod.yaml index 27b11a6..cb2defe 100644 --- a/.deploy-infra/deploy-prod.yaml +++ b/.deploy-infra/deploy-prod.yaml @@ -33,7 +33,9 @@ services: start_period: 20s timeout: 10s ports: - - "5432:5432" + - published: 5432 + target: 5432 + mode: host deploy: mode: replicated restart_policy: @@ -57,7 +59,9 @@ services: MONGO_INITDB_ROOT_USERNAME: mongo MONGO_INITDB_ROOT_PASSWORD: $MONGO_PASSWORD_PROD ports: - - "27017:27017" + - published: 27017 + target: 27017 + mode: host deploy: mode: replicated restart_policy: @@ -73,8 +77,12 @@ services: volumes: - /sprint-data/rabbitmq:/var/lib/rabbitmq ports: - - "5672:5672" - - "15672:15672" + - published: 5672 + target: 5672 + mode: host + - published: 15672 + target: 15672 + mode: host environment: RABBITMQ_DEFAULT_PASS: $RABBITMQ_PASSWORD_PROD deploy: @@ -92,7 +100,9 @@ services: volumes: - /sprint-data/redis:/data ports: - - "6379:6379" + - published: 6379 + target: 6379 + mode: host command: redis-server --requirepass $REDIS_PASSWORD_PROD deploy: mode: replicated @@ -112,8 +122,12 @@ services: MINIO_ROOT_USER: minioadmin MINIO_ROOT_PASSWORD: $MINIO_PASSWORD_PROD ports: - - "9000:9000" - - "9001:9001" + - published: 9000 + target: 9000 + mode: host + - published: 9001 + target: 9001 + mode: host deploy: mode: replicated placement: From 9b0e4a347fd24616eb39a0a0e1a9159094ddc5fa Mon Sep 17 00:00:00 2001 From: emmatveev Date: Sat, 23 Nov 2024 21:07:48 +0300 Subject: [PATCH 2/4] fix --- .gitea/workflows/deploy-prod.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-prod.yaml b/.gitea/workflows/deploy-prod.yaml index 5c555a7..d76b613 100644 --- a/.gitea/workflows/deploy-prod.yaml +++ b/.gitea/workflows/deploy-prod.yaml @@ -9,7 +9,7 @@ on: jobs: build: name: Build - runs-on: [ dev ] + runs-on: [ prod ] steps: - name: login run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }} @@ -23,7 +23,7 @@ jobs: run: docker build -t mathwave/sprint-repo:gitea-runner gitea-runner push: name: Push - runs-on: [ dev ] + runs-on: [ prod ] needs: build steps: - name: push nginx prod From 40cf1dc8de97f43d9e8168890a39ec835f0284ad Mon Sep 17 00:00:00 2001 From: emmatveev Date: Sat, 23 Nov 2024 21:12:02 +0300 Subject: [PATCH 3/4] nginx --- .deploy-infra/deploy-prod.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.deploy-infra/deploy-prod.yaml b/.deploy-infra/deploy-prod.yaml index cb2defe..cad5e3f 100644 --- a/.deploy-infra/deploy-prod.yaml +++ b/.deploy-infra/deploy-prod.yaml @@ -7,8 +7,12 @@ services: networks: - common-infra-nginx ports: - - "80:80" - - "443:443" + - published: 80 + target: 80 + mode: host + - published: 443 + target: 443 + mode: host deploy: mode: replicated replicas: 1 From de26ebe88e0148dbb5eebaa0a8bf5a3fa56905a8 Mon Sep 17 00:00:00 2001 From: emmatveev Date: Sat, 23 Nov 2024 21:16:59 +0300 Subject: [PATCH 4/4] fix --- .deploy-infra/deploy-dev.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.deploy-infra/deploy-dev.yaml b/.deploy-infra/deploy-dev.yaml index e9c78e4..90521c9 100644 --- a/.deploy-infra/deploy-dev.yaml +++ b/.deploy-infra/deploy-dev.yaml @@ -7,8 +7,12 @@ services: networks: - common-infra-nginx-development ports: - - "80:80" - - "443:443" + - published: 80 + target: 80 + mode: host + - published: 443 + target: 443 + mode: host deploy: mode: replicated replicas: 1