Skip to content

Commit 4400cd2

Browse files
authored
Add .env (#5216)
1 parent 795fe72 commit 4400cd2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

install/libretranslate-install.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ $STD uv pip install "numpy<2"
4343
$STD uv pip install .
4444
$STD uv pip install libretranslate
4545
$STD .venv/bin/python scripts/install_models.py
46+
47+
cat <<EOF >/opt/libretranslate/.env
48+
LT_PORT=5000
49+
EOF
4650
msg_ok "Installed LibreTranslate"
4751

4852
msg_info "Creating Service"
@@ -56,6 +60,7 @@ User=root
5660
Type=idle
5761
Restart=always
5862
Environment="PATH=/usr/local/lib/python3.11/dist-packages/libretranslate"
63+
EnvironmentFile=/opt/libretranslate/.env
5964
ExecStart=/opt/libretranslate/.venv/bin/python3 /opt/libretranslate/.venv/bin/libretranslate --host * --update-models
6065
ExecReload=/bin/kill -s HUP
6166
KillMode=mixed

0 commit comments

Comments
 (0)