fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 20s
Deploy Dev / Push (pull_request) Successful in 9s
Deploy Dev / Deploy dev (pull_request) Successful in 17s

This commit is contained in:
Egor Matveev
2025-09-15 00:19:20 +03:00
parent 5e2c725bc2
commit 7448b4e0c6
3 changed files with 13 additions and 12 deletions

View File

@@ -6,12 +6,12 @@ services:
worker:
image: mathwave/sprint-repo:ruz-bot
environment:
MONGO_HOST: "mongo.dev.chocomarsh.com"
STAGE: "development"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
networks:
- queues-development
- configurator
- mongo-development
command: worker
deploy:
mode: replicated
@@ -24,12 +24,11 @@ services:
fetch:
image: mathwave/sprint-repo:ruz-bot
environment:
MONGO_HOST: "mongo.dev.chocomarsh.com"
STAGE: "development"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
networks:
- queues-development
- mongo-development
command: fetch
deploy:
mode: replicated
@@ -42,12 +41,11 @@ services:
notify:
image: mathwave/sprint-repo:ruz-bot
environment:
MONGO_HOST: "mongo.dev.chocomarsh.com"
STAGE: "development"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
networks:
- queues-development
- mongo-development
command: notify
deploy:
mode: replicated
@@ -62,11 +60,10 @@ services:
networks:
- common-infra-nginx-development
- queues-development
- mongo-development
environment:
MONGO_HOST: "mongo.dev.chocomarsh.com"
STAGE: "development"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
command: api
deploy:
mode: replicated
@@ -83,3 +80,5 @@ networks:
external: true
configurator:
external: true
mongo-development:
external: true

View File

@@ -6,12 +6,12 @@ services:
worker:
image: mathwave/sprint-repo:ruz-bot
environment:
MONGO_HOST: "mongo.chocomarsh.com"
STAGE: "production"
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
networks:
- queues
- configurator
- mongo
command: worker
deploy:
mode: replicated
@@ -24,13 +24,13 @@ services:
fetch:
image: mathwave/sprint-repo:ruz-bot
environment:
MONGO_HOST: "mongo.chocomarsh.com"
STAGE: "production"
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
DEBUG: "false"
networks:
- queues
- configurator
- mongo
command: fetch
deploy:
mode: replicated
@@ -43,13 +43,13 @@ services:
notify:
image: mathwave/sprint-repo:ruz-bot
environment:
MONGO_HOST: "mongo.chocomarsh.com"
STAGE: "production"
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
DEBUG: "false"
networks:
- queues
- configurator
- mongo
command: notify
deploy:
mode: replicated
@@ -64,8 +64,8 @@ services:
networks:
- common-infra-nginx
- configurator
- mongo
environment:
MONGO_HOST: "mongo.chocomarsh.com"
STAGE: "production"
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
DEBUG: "false"
@@ -85,3 +85,5 @@ networks:
external: true
configurator:
external: true
mongo:
external: true

View File

@@ -9,7 +9,7 @@ from helpers import now
class Mongo:
def __init__(self):
url = f"mongodb://{settings.MONGO_USER}:{settings.MONGO_PASSWORD}@{settings.MONGO_HOST}:27017/"
url = f"mongodb://{settings.MONGO_USER}:{settings.MONGO_PASSWORD}@mongo:27017/"
self.client = pymongo.MongoClient(url)
self.database = self.client.get_database("ruz-bot")
self.users_collection.create_index([