From 9379e37266b4783577a72bab7aca6a9655b04405 Mon Sep 17 00:00:00 2001 From: "P.J. Finlay" Date: Tue, 13 Jul 2021 00:21:25 +0000 Subject: Nginx and systemd setup --- README.md | 2 ++ setup.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index a5da3f4..399b399 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # LibreTranslate-init Run LibreTranslate on Ubuntu 20.04 server + +Runs [LibreTranslate with Gunicorn and Nginx](https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04). diff --git a/setup.sh b/setup.sh index 8e45ac5..f53d4b3 100755 --- a/setup.sh +++ b/setup.sh @@ -7,3 +7,15 @@ sudo apt-get install -y libicu-dev python3-icu pkg-config # Install Nginx sudo apt-get install -y nginx + +# Setup systemd +sudo cp libretranslate.service /etc/systemd/system/ +sudo systemctl start libretranslate +sudo systemctl enable libretranslate +sudo systemctl status libretranslate + +# Configure Nginx +sudo cp nginx /etc/nginx/sites-available/default +sudo nginx -t +sudo systemctl restart nginx + -- cgit v1.2.3