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: