service (WIP - venv fixes?)
This commit is contained in:
parent
136ca40713
commit
e3b1ac8bd1
4 changed files with 36 additions and 5 deletions
10
deploy/jet-search
Normal file
10
deploy/jet-search
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
13
deploy/jet-search.service
Normal file
13
deploy/jet-search.service
Normal file
|
@ -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
|
13
deploy/setup.sh
Executable file
13
deploy/setup.sh
Executable file
|
@ -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
|
5
wsgi.py
5
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.",
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue