mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-12-25 06:17:28 -05:00
26 lines
1.1 KiB
Bash
Executable File
26 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eo pipefail
|
|
__dirname=$(cd "$(dirname "$0")"; pwd -P)
|
|
cd "${__dirname}/.."
|
|
|
|
echo ""
|
|
echo "░█░░░▀█▀░█▀▄░█▀▄░█▀▀░▀█▀░█▀▄░█▀█░█▀█░█▀▀░█░░░█▀█░▀█▀░█▀▀"
|
|
echo "░█░░░░█░░█▀▄░█▀▄░█▀▀░░█░░█▀▄░█▀█░█░█░▀▀█░█░░░█▀█░░█░░█▀▀"
|
|
echo "░▀▀▀░▀▀▀░▀▀░░▀░▀░▀▀▀░░▀░░▀░▀░▀░▀░▀░▀░▀▀▀░▀▀▀░▀░▀░░▀░░▀▀▀"
|
|
|
|
echo "v$(cat VERSION)"
|
|
echo ""
|
|
|
|
echo Booting...
|
|
|
|
if [ -f ./venv/bin/libretranslate ]; then
|
|
LT_POWERCYCLE=1 ./venv/bin/libretranslate "$@"
|
|
else
|
|
echo "WARNING: Cannot powercycle LibreTranslate (if you are in development mode, that's fine..)"
|
|
fi
|
|
|
|
eval $(./venv/bin/python ./scripts/print_args_env.py "$@")
|
|
PROMETHEUS_MULTIPROC_DIR="${__dirname}/../db/prometheus" ./venv/bin/gunicorn -c scripts/gunicorn_conf.py --workers $LT_THREADS --max-requests 250 --timeout 90 --bind [::]:$LT_PORT 'wsgi:app'
|
|
|