diff options
author | P.J. Finlay <pjappdevelopment@gmail.com> | 2021-07-17 16:32:29 +0000 |
---|---|---|
committer | P.J. Finlay <pjappdevelopment@gmail.com> | 2021-07-17 16:32:29 +0000 |
commit | 27de0e82154390765d85c41589ebadd6dbcdfe7a (patch) | |
tree | 76fb90b01802c74203d707dde63c2cc0b15600ee | |
parent | 32ea9c6b15518ca313e45b91b66b16261757ec7a (diff) |
Made username libretranslate
-rw-r--r-- | README.md | 23 | ||||
-rw-r--r-- | libretranslate.service | 8 | ||||
-rw-r--r-- | nginx | 2 |
3 files changed, 18 insertions, 15 deletions
@@ -1,15 +1,15 @@ # LibreTranslate-init -Run LibreTranslate on Ubuntu 20.04. +Run [LibreTranslate](https://libretranslate.com) on Ubuntu 20.04. Uses [LibreTranslate WSGI](https://community.libretranslate.com/t/is-wsgi-currently-supported/24/3) with [Gunicorn and Nginx](https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04). ``` -# Add argosopentech user -useradd argosopentech -mkdir /home/argosopentech -chown argosopentech:argosopentech /home/argosopentech -usermod -aG sudo argosopentech -su argosopentech +# Add libretranslate user +useradd libretranslate +mkdir /home/libretranslate +chown libretranslate:libretranslate /home/libretranslate +usermod -aG sudo libretranslate +su libretranslate # Add swap space (optional) sudo fallocate -l 10G /swapfile @@ -18,14 +18,17 @@ sudo mkswap /swapfile sudo swapon /swapfile sudo swapon --show -# Download and run LibreTranslate-init -git clone https://github.com/argosopentech/LibreTranslate-init.git ~/LibreTranslate-init +# Download LibreTranslate-init +git clone https://github.com/libretranslate/LibreTranslate-init.git ~/LibreTranslate-init -# Run LibreTranslate on port 5000 +# Download dependencies and run LibreTranslate on port 5000 ~/LibreTranslate-init/setup.sh # Run LibreTranslate WSGI with nginx and systemd ~/LibreTranslate-init/run.sh +# Check LibreTranslate status +sudo systemctl status libretranslate + ``` diff --git a/libretranslate.service b/libretranslate.service index ac6a081..10d5138 100644 --- a/libretranslate.service +++ b/libretranslate.service @@ -3,11 +3,11 @@ Description=LibreTranslate WSGI with Gunicorn and Nginx After=network.target [Service] -User=argosopentech +User=libretranslate Group=www-data -WorkingDirectory=/home/argosopentech/LibreTranslate -Environment="PATH=/home/argosopentech/LibreTranslate/env/bin" -ExecStart=/home/argosopentech/LibreTranslate/env/bin/gunicorn --workers 3 --bind unix:libretranslate.sock -m 007 wsgi:app +WorkingDirectory=/home/libretranslate/LibreTranslate +Environment="PATH=/home/libretranslate/LibreTranslate/env/bin" +ExecStart=/home/libretranslate/LibreTranslate/env/bin/gunicorn --workers 3 --bind unix:libretranslate.sock -m 007 wsgi:app [Install] WantedBy=multi-user.target @@ -4,6 +4,6 @@ server { location / { include proxy_params; - proxy_pass http://unix:/home/argosopentech/LibreTranslate/libretranslate.sock; + proxy_pass http://unix:/home/libretranslate/LibreTranslate/libretranslate.sock; } } |