Merge pull request 'fix' (#14) from master into dev

Reviewed-on: #14
This commit is contained in:
emmatveev 2025-01-06 14:30:11 +03:00
commit 71db409b15
4 changed files with 60 additions and 2 deletions

View File

@ -6,6 +6,7 @@ services:
image: mathwave/sprint-repo:queues
networks:
- queues-development
- queues-mongo-development
environment:
MONGO_HOST: "mongo.develop.sprinthub.ru"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
@ -20,6 +21,27 @@ services:
parallelism: 1
order: start-first
storage:
image: mongo:6.0.2
networks:
- queues-mongo-development
volumes:
- /sprint-data/queues-mongo:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: mongo
MONGO_INITDB_ROOT_PASSWORD: password
deploy:
mode: replicated
restart_policy:
condition: any
placement:
constraints: [node.labels.stage == development]
update_config:
parallelism: 1
order: start-first
networks:
queues-development:
external: true
queues-mongo-development:
driver: overlay

View File

@ -6,6 +6,7 @@ services:
image: mathwave/sprint-repo:queues
networks:
- queues
- queues-mongo-production
environment:
MONGO_HOST: "mongo.sprinthub.ru"
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
@ -20,6 +21,27 @@ services:
parallelism: 1
order: start-first
storage:
image: mongo:6.0.2
networks:
- queues-mongo-production
volumes:
- /sprint-data/queues-mongo:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: mongo
MONGO_INITDB_ROOT_PASSWORD: password
deploy:
mode: replicated
restart_policy:
condition: any
placement:
constraints: [node.labels.stage == development]
update_config:
parallelism: 1
order: start-first
networks:
queues:
external: true
queues-mongo-production:
driver: overlay

View File

@ -26,6 +26,13 @@ jobs:
steps:
- name: push
run: docker push mathwave/sprint-repo:queues
create_dir:
name: Create dir
runs-on: [ dev ]
needs: build
steps:
- name: create_dir
run: mkdir /sprint-data/queues-mongo || true
deploy-dev:
name: Deploy dev
runs-on: [prod]
@ -41,4 +48,4 @@ jobs:
env:
MONGO_PASSWORD_DEV: ${{ secrets.MONGO_PASSWORD_DEV }}
REDIS_PASSWORD_DEV: ${{ secrets.REDIS_PASSWORD_DEV }}
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml infra-development
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml queues-development

View File

@ -26,6 +26,13 @@ jobs:
steps:
- name: push
run: docker push mathwave/sprint-repo:queues
create_dir:
name: Create dir
runs-on: [ prod ]
needs: build
steps:
- name: create_dir
run: mkdir /sprint-data/queues-mongo || true
deploy-prod:
name: Deploy prod
runs-on: [prod]
@ -41,4 +48,4 @@ jobs:
env:
MONGO_PASSWORD_PROD: ${{ secrets.MONGO_PASSWORD_PROD }}
REDIS_PASSWORD_PROD: ${{ secrets.REDIS_PASSWORD_PROD }}
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-prod.yaml infra
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-prod.yaml queues