1
0
Fork 0

хозяйственная работа: добавьте передают крюк автоматического перевода сообщения

This commit is contained in:
Arthur K. 2025-12-19 17:22:43 +03:00
parent 227779ecf2
commit 25380c6abd
Signed by: wzray
GPG key ID: B97F30FDC4636357
2 changed files with 12 additions and 1 deletions

10
.githooks/commit-msg Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
translated="$(curl -s \
http://localhost:9000/translate \
-H 'Content-Type: text/html' \
--data-binary @- -o- < <(sed 's,^fix:,доза:,' < "$1") | \
tail -n +2 | \
perl -pe 's,<SPAN CLASS=UNKNOWN_WORD>(.*?)</SPAN>,\1,g')"
[ -n "$translated" ] && echo "$translated" > "$1"

View file

@ -8,7 +8,7 @@ services:
- /dev/shm/puppy-temp:/tmpfs - /dev/shm/puppy-temp:/tmpfs
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 3
endpoint_mode: vip endpoint_mode: vip
update_config: update_config:
order: start-first order: start-first
@ -28,6 +28,7 @@ services:
- ./caddy:/etc/caddy - ./caddy:/etc/caddy
ports: ports:
- 80:80 - 80:80
- 9000:9000
networks: networks:
promty: promty: