From 25380c6abdd683b9df76e40028e7fd2ce14f799b Mon Sep 17 00:00:00 2001 From: "Arthur K." Date: Fri, 19 Dec 2025 17:22:43 +0300 Subject: [PATCH] =?UTF-8?q?=D1=85=D0=BE=D0=B7=D1=8F=D0=B9=D1=81=D1=82?= =?UTF-8?q?=D0=B2=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=B0:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D1=8C=D1=82?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=D0=B0=D1=8E=D1=82=20?= =?UTF-8?q?=D0=BA=D1=80=D1=8E=D0=BA=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=D0=B0=20=D1=81=D0=BE=D0=BE?= =?UTF-8?q?=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .githooks/commit-msg | 10 ++++++++++ docker-compose.yml | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 .githooks/commit-msg diff --git a/.githooks/commit-msg b/.githooks/commit-msg new file mode 100755 index 0000000..e53acec --- /dev/null +++ b/.githooks/commit-msg @@ -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,(.*?),\1,g')" + +[ -n "$translated" ] && echo "$translated" > "$1" diff --git a/docker-compose.yml b/docker-compose.yml index 0fc15d0..b4f7eaa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: - /dev/shm/puppy-temp:/tmpfs deploy: mode: replicated - replicas: 1 + replicas: 3 endpoint_mode: vip update_config: order: start-first @@ -28,6 +28,7 @@ services: - ./caddy:/etc/caddy ports: - 80:80 + - 9000:9000 networks: promty: