Compare commits

..

13 Commits

Author SHA1 Message Date
a327ba1fcb Merge pull request 'master' (#17) from master into dev
Reviewed-on: #17
2025-09-18 23:45:36 +03:00
f8b700b982 Update .deploy/deploy-prod.yaml
All checks were successful
Deploy Dev / Build (pull_request) Successful in 1m12s
Deploy Dev / Push (pull_request) Successful in 28s
Deploy Dev / Deploy dev (pull_request) Successful in 26s
Deploy Prod / Build (pull_request) Successful in 7s
Deploy Prod / Push (pull_request) Successful in 11s
Deploy Prod / Deploy prod (pull_request) Successful in 13s
2025-09-18 23:45:10 +03:00
c96ad735d7 Update .deploy/deploy-dev.yaml 2025-09-18 23:44:00 +03:00
ddb8b97fd4 Update .deploy/deploy-prod.yaml
All checks were successful
Deploy Prod / Build (pull_request) Successful in 59s
Deploy Prod / Push (pull_request) Successful in 30s
Deploy Prod / Deploy prod (pull_request) Successful in 13s
2025-09-14 09:58:41 +03:00
e014b1f526 Update .deploy/deploy-dev.yaml 2025-09-14 09:57:54 +03:00
f1b57abeca fix
All checks were successful
Deploy Prod / Build (pull_request) Successful in 6s
Deploy Prod / Push (pull_request) Successful in 13s
Deploy Prod / Deploy prod (pull_request) Successful in 14s
2024-12-08 15:50:16 +03:00
fa1b0c9700 Merge pull request 'fix' (#9) from config into dev
Reviewed-on: #9
2024-11-24 23:32:45 +03:00
7cf29376bd Merge pull request 'fix' (#8) from config into dev
Reviewed-on: #8
2024-11-24 22:50:13 +03:00
a1d0b8e14f Merge pull request 'fix' (#7) from config into dev
Reviewed-on: #7
2024-11-24 12:28:28 +03:00
6c6e8867fd Merge pull request 'fix' (#6) from config into dev
Reviewed-on: #6
2024-11-24 12:25:04 +03:00
fc007cfdcd Merge pull request 'fix' (#5) from config into dev
Reviewed-on: #5
2024-11-24 12:08:40 +03:00
24e0029d10 Merge pull request 'config' (#4) from config into dev
Reviewed-on: #4
2024-11-24 12:07:02 +03:00
e9574ff7a8 Merge pull request 'fix' (#1) from master into dev
Reviewed-on: #1
2024-10-11 16:21:40 +03:00
6 changed files with 91 additions and 22 deletions

View File

@@ -8,15 +8,15 @@ services:
networks:
- common-infra-nginx-development
- configurator-development
- postgres-development
- minio-development
environment:
DB_HOST: "pg.develop.sprinthub.ru"
DB_HOST: "postgres"
DB_PASSWORD: $DB_PASSWORD_DEV
MINIO_HOST: "minio.develop.sprinthub.ru"
MINIO_HOST: "minio"
MINIO_SECRET_KEY: $MINIO_SECRET_KEY_DEV
REDIS_HOST: "redis.develop.sprinthub.ru"
REDIS_HOST: "redis.dev.chocomarsh.com"
REDIS_PASSWORD: $REDIS_PASSWORD_DEV
RABBITMQ_HOST: "rabbitmq.develop.sprinthub.ru"
RABBITMQ_PASSWORD: $RABBITMQ_PASSWORD_DEV
VK_SERVICE_TOKEN: $VK_SERVICE_TOKEN
YANDEX_SERVICE_TOKEN: $YANDEX_SERVICE_TOKEN
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
@@ -37,15 +37,16 @@ services:
fetch_stats:
image: mathwave/sprint-repo:platform
networks:
- postgres-development
- minio-development
environment:
DB_HOST: "pg.develop.sprinthub.ru"
DB_HOST: "postgres"
DB_PASSWORD: $DB_PASSWORD_DEV
MINIO_HOST: "minio.develop.sprinthub.ru"
MINIO_HOST: "minio"
MINIO_SECRET_KEY: $MINIO_SECRET_KEY_DEV
REDIS_HOST: "redis.develop.sprinthub.ru"
REDIS_HOST: "redis.dev.chocomarsh.com"
REDIS_PASSWORD: $REDIS_PASSWORD_DEV
RABBITMQ_HOST: "rabbitmq.develop.sprinthub.ru"
RABBITMQ_PASSWORD: $RABBITMQ_PASSWORD_DEV
VK_SERVICE_TOKEN: $VK_SERVICE_TOKEN
YANDEX_SERVICE_TOKEN: $YANDEX_SERVICE_TOKEN
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
@@ -60,11 +61,19 @@ services:
migrate:
image: mathwave/sprint-repo:platform
networks:
- postgres-development
- minio-development
environment:
DB_HOST: "pg.develop.sprinthub.ru"
DB_HOST: "postgres"
DB_PASSWORD: $DB_PASSWORD_DEV
MINIO_HOST: "minio.develop.sprinthub.ru"
MINIO_HOST: "minio"
MINIO_SECRET_KEY: $MINIO_SECRET_KEY_DEV
REDIS_HOST: "redis.dev.chocomarsh.com"
REDIS_PASSWORD: $REDIS_PASSWORD_DEV
VK_SERVICE_TOKEN: $VK_SERVICE_TOKEN
YANDEX_SERVICE_TOKEN: $YANDEX_SERVICE_TOKEN
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
command: migrate
deploy:
mode: replicated
@@ -79,3 +88,7 @@ networks:
external: true
configurator-development:
external: true
postgres-development:
external: true
minio-development:
external: true

View File

@@ -8,14 +8,16 @@ services:
networks:
- common-infra-nginx
- configurator
- postgres
- minio
environment:
DB_HOST: "pg.sprinthub.ru"
DB_HOST: "postgres"
DB_PASSWORD: $DB_PASSWORD_PROD
MINIO_HOST: "minio.sprinthub.ru"
MINIO_HOST: "minio"
MINIO_SECRET_KEY: $MINIO_SECRET_KEY_PROD
REDIS_HOST: "redis.sprinthub.ru"
REDIS_HOST: "redis.chocomarsh.com"
REDIS_PASSWORD: $REDIS_PASSWORD_PROD
RABBITMQ_HOST: "rabbitmq.sprinthub.ru"
RABBITMQ_HOST: "rabbitmq.chocomarsh.com"
RABBITMQ_PASSWORD: $RABBITMQ_PASSWORD_PROD
VK_SERVICE_TOKEN: $VK_SERVICE_TOKEN
YANDEX_SERVICE_TOKEN: $YANDEX_SERVICE_TOKEN
@@ -37,14 +39,17 @@ services:
fetch_stats:
image: mathwave/sprint-repo:platform
networks:
- postgres
- minio
environment:
DB_HOST: "pg.sprinthub.ru"
DB_HOST: "postgres"
DB_PASSWORD: $DB_PASSWORD_PROD
MINIO_HOST: "minio.sprinthub.ru"
MINIO_HOST: "minio"
MINIO_SECRET_KEY: $MINIO_SECRET_KEY_PROD
REDIS_HOST: "redis.sprinthub.ru"
REDIS_HOST: "redis.chocomarsh.com"
REDIS_PASSWORD: $REDIS_PASSWORD_PROD
RABBITMQ_HOST: "rabbitmq.sprinthub.ru"
RABBITMQ_HOST: "rabbitmq.chocomarsh.com"
RABBITMQ_PASSWORD: $RABBITMQ_PASSWORD_PROD
VK_SERVICE_TOKEN: $VK_SERVICE_TOKEN
YANDEX_SERVICE_TOKEN: $YANDEX_SERVICE_TOKEN
@@ -60,10 +65,13 @@ services:
migrate:
image: mathwave/sprint-repo:platform
networks:
- postgres
- minio
environment:
DB_HOST: "pg.sprinthub.ru"
DB_HOST: "postgres"
DB_PASSWORD: $DB_PASSWORD_PROD
MINIO_HOST: "minio.sprinthub.ru"
MINIO_HOST: "minio"
MINIO_SECRET_KEY: $MINIO _SECRET_KEY_PROD
command: migrate
deploy:
@@ -79,3 +87,7 @@ networks:
external: true
configurator:
external: true
postgres:
external: true
minio:
external: true

37
generator.py Normal file
View File

@@ -0,0 +1,37 @@
import json
import urllib.request
import os
import shutil
projects = {
'queues': 'tasks.proto'
}
try:
shutil.rmtree('schemas')
except:
pass
try:
os.mkdir('schemas')
except:
pass
for project in projects:
response = urllib.request.urlopen(f'https://platform.sprinthub.ru/schemas/get?project={project}').read()
data = json.loads(response)
os.mkdir(f'schemas/{project}')
for key, value in data.items():
with open(f'schemas/{project}/{key}', 'w+') as fp:
fp.write(value)
for key, value in projects.items():
os.system(f'python -m grpc_tools.protoc --proto_path schemas --python_out=. --pyi_out=. --grpc_python_out=. ./schemas/{key}/{value}')
try:
shutil.rmtree('schemas')
except:
pass

View File

@@ -15,4 +15,5 @@ urlpatterns = [
path(*YandexAuthView.as_path()),
path('is_staff', is_staff),
path('fetch', fetch),
path('generator', generator),
]

View File

@@ -9,3 +9,4 @@ from .vk_auth import VKAuthView
from .yandex_auth import YandexAuthView
from .is_staff import is_staff
from .fetch import fetch
from .generator import generator

5
web/views/generator.py Normal file
View File

@@ -0,0 +1,5 @@
from django.http import HttpResponse
def generator(request):
return HttpResponse(open('generator.py', 'rb').read())