diff --git a/deploy/jet-search b/deploy/jet-search new file mode 100644 index 0000000..3819854 --- /dev/null +++ b/deploy/jet-search @@ -0,0 +1,10 @@ +server { + listen 80; + server_name _; + + location / { + proxy_pass http://127.0.0.1:5000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } +} \ No newline at end of file diff --git a/deploy/jet-search.service b/deploy/jet-search.service new file mode 100644 index 0000000..7de2724 --- /dev/null +++ b/deploy/jet-search.service @@ -0,0 +1,13 @@ +[Unit] +Description=JetSearch Service +After=network.target + +[Service] +User=root +Group=root +WorkingDirectory=/root/jet-search +Environment="PATH=/root/jet-search/venv/bin" +ExecStart=/root/jet-search/venv/bin/gunicorn wsgi:app -b '127.0.0.1:5000' + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/deploy/setup.sh b/deploy/setup.sh new file mode 100755 index 0000000..abbbf37 --- /dev/null +++ b/deploy/setup.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# This file is part of VM-Experiments. +# Licensed under the AGPL-3.0-or-later. See LICENSE for details. + +cd /root/jet-search/deploy/ +mv jet-search /etc/nginx/sites-enabled/ +mv jet-search.service /etc/systemd/system/ +systemctl enable jet-search.service +cd .. +python3 -m venv venv +source venv/bin/activate +pip install -r requirements.txt diff --git a/wsgi.py b/wsgi.py index a6e4d92..ec30084 100644 --- a/wsgi.py +++ b/wsgi.py @@ -11,11 +11,6 @@ search_terms = [ "link": "https://jetsearch.com/", "description": "World's fastest search engine.", }, - { - "term": "JetSearch", - "link": "https://jetsearch.com/", - "description": "World's fastest search engine.", - }, ]