Compare commits

...

9 Commits

Author SHA1 Message Date
2f3d785aec Merge pull request 'master' (#9) from master into prod
Reviewed-on: #9
2025-09-14 09:45:16 +03:00
f165ee6f30 Update .deploy/deploy-prod.yaml
All checks were successful
Deploy Prod / Build (pull_request) Successful in 5s
Deploy Prod / Push (pull_request) Successful in 9s
Deploy Prod / Deploy prod (pull_request) Successful in 13s
2025-09-14 09:45:04 +03:00
8cdf0cbd8d Update .deploy/deploy-prod.yaml
All checks were successful
Deploy Dev / Build (pull_request) Successful in 1m20s
Deploy Dev / Push (pull_request) Successful in 22s
Deploy Dev / Deploy dev (pull_request) Successful in 29s
2025-09-12 20:42:31 +03:00
6a1f2d3d09 Update .deploy/deploy-dev.yaml 2025-09-12 20:42:09 +03:00
Egor Matveev
6509e58b6e fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 6s
Deploy Dev / Push (pull_request) Successful in 12s
Deploy Dev / Deploy dev (pull_request) Successful in 19s
2025-07-08 02:05:25 +04:00
Egor Matveev
28df4aef54 fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 7s
Deploy Dev / Push (pull_request) Successful in 13s
Deploy Dev / Deploy dev (pull_request) Successful in 18s
2025-07-08 01:30:10 +04:00
Egor Matveev
c15e950e02 fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 6s
Deploy Dev / Push (pull_request) Successful in 13s
Deploy Dev / Deploy dev (pull_request) Successful in 20s
2025-07-08 01:25:34 +04:00
Egor Matveev
10f86f2f99 fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 6s
Deploy Dev / Push (pull_request) Successful in 13s
Deploy Dev / Deploy dev (pull_request) Successful in 36s
2025-07-08 01:21:29 +04:00
2a1c13e351 Merge pull request 'Update .deploy/deploy-prod.yaml' (#1) from master into prod
Reviewed-on: #1
2024-12-02 15:23:50 +03:00
5 changed files with 10 additions and 27 deletions

View File

@@ -21,7 +21,7 @@ services:
networks:
- b-jokes-net
environment:
MONGO_HOST: "mongo.develop.sprinthub.ru"
MONGO_HOST: "mongo.dev.chocomarsh.com"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
command: api
deploy:
@@ -35,7 +35,7 @@ services:
poll:
image: mathwave/sprint-repo:b-jokes
environment:
MONGO_HOST: "mongo.develop.sprinthub.ru"
MONGO_HOST: "mongo.dev.chocomarsh.com"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
command: poll
deploy:
@@ -49,8 +49,9 @@ services:
bot:
image: mathwave/sprint-repo:b-jokes
environment:
MONGO_HOST: "mongo.develop.sprinthub.ru"
MONGO_HOST: "mongo.dev.chocomarsh.com"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
STAGE: "development"
command: bot
networks:
- configurator

View File

@@ -21,7 +21,7 @@ services:
networks:
- b-jokes-net
environment:
MONGO_HOST: "mongo.sprinthub.ru"
MONGO_HOST: "mongo.chocomarsh.com"
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
DEBUG: "false"
command: api
@@ -36,7 +36,7 @@ services:
poll:
image: mathwave/sprint-repo:b-jokes
environment:
MONGO_HOST: "mongo.sprinthub.ru"
MONGO_HOST: "mongo.chocomarsh.com"
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
DEBUG: "false"
command: poll
@@ -48,29 +48,8 @@ services:
parallelism: 1
order: start-first
bot:
image: mathwave/sprint-repo:b-jokes
environment:
MONGO_HOST: "mongo.sprinthub.ru"
MONGO_PASSWORD: $MONGO_PASSWORD_PROD
command: bot
networks:
- configurator
- queues
deploy:
mode: replicated
restart_policy:
condition: any
update_config:
parallelism: 1
order: start-first
networks:
b-jokes-net:
driver: overlay
common-infra-nginx:
external: true
configurator:
external: true
queues:
external: true

View File

@@ -32,7 +32,7 @@ jobs:
run: docker push mathwave/sprint-repo:b-jokes-nginx
deploy-dev:
name: Deploy dev
runs-on: [dev]
runs-on: [prod]
needs: push
steps:
- name: login

View File

@@ -12,5 +12,7 @@ if arg == "poll":
jokes.poll_jokes()
elif arg == "api":
main.run()
elif arg == "bot":
main.bot()
else:
raise NotImplementedError("No arg specified!")

View File

@@ -55,6 +55,7 @@ def bot():
text = payload.get('text')
if not text:
return
text = text.lower()
for word in configurator.get_config('words'):
if word in text:
mes = 'Держи шутку!\n' + get_random()