forked from crony/UpFast
Compare commits
7 Commits
b376d91e21
...
5d47eb3243
Author | SHA1 | Date | |
---|---|---|---|
|
5d47eb3243 | ||
|
9f8afe5054 | ||
|
edc99c3481 | ||
|
8fdc68b441 | ||
dcda0f372a | |||
09d2c4f863 | |||
9abd361c7f |
13
README.md
13
README.md
@ -23,15 +23,12 @@ cd
|
||||
git clone https://code.cronyakatsuki.xyz/crony/upfast .
|
||||
|
||||
# Create the virtual environment and load it for user on default
|
||||
python3 -m venv venv
|
||||
python3 -m venv env
|
||||
# Activate the virtual environment
|
||||
source venv/bin/activate
|
||||
source env/bin/activate
|
||||
# Install all the requirements
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Load environment by default
|
||||
echo "source /usr/local/upfast/venv/bin/activate" > "/usr/local/upfast/.profile"
|
||||
|
||||
# create the upload directory
|
||||
mkdir upload
|
||||
|
||||
@ -52,7 +49,7 @@ Documentation=https://code.cronyakatsuki.xyz/crony/upfast
|
||||
User=upfast
|
||||
Group=upfast
|
||||
WorkingDirectory=/usr/local/upfast/
|
||||
ExecStart=/usr/local/upfast/venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000 --proxy-headers --forwarded-allow-ips='*'
|
||||
ExecStart=/usr/local/upfast/env/bin/uvicorn main:app --host 127.0.0.1 --port 8000 --proxy-headers --forwarded-allow-ips='*'
|
||||
Restart=on-failure
|
||||
```
|
||||
Finally run following commmands.
|
||||
@ -99,3 +96,7 @@ server {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Contributions
|
||||
|
||||
Thanks [TLasT](https://craftmenners.men) on his help with testing and documentation.
|
||||
|
@ -5,8 +5,7 @@ html {
|
||||
body {
|
||||
max-width: 900px;
|
||||
margin: auto;
|
||||
background: #303446;
|
||||
color: #c6d0f5;
|
||||
background: #81a1c1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@ -16,7 +15,7 @@ h1 {
|
||||
|
||||
hr {
|
||||
margin: 40px;
|
||||
color: #626880;
|
||||
color: #2e3440;
|
||||
}
|
||||
|
||||
img {
|
||||
@ -34,9 +33,9 @@ video {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #f2d5cf;
|
||||
color: #ebcb8b;
|
||||
text-decoration: none;
|
||||
font-style: bold;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
@ -45,7 +44,7 @@ a:hover {
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #292c3c;
|
||||
background: #2e3440;
|
||||
font-size: 1am;
|
||||
padding: 10px;
|
||||
max-width: 800;
|
||||
@ -54,6 +53,7 @@ pre {
|
||||
overflow-x: scroll;
|
||||
border: none;
|
||||
border-radius: 1rem;
|
||||
color: #88c0d0;
|
||||
}
|
||||
|
||||
.file {
|
||||
|
@ -1,8 +1,7 @@
|
||||
body {
|
||||
max-width: 900px;
|
||||
margin: auto;
|
||||
background: #303446;
|
||||
color: #c6d0f5;
|
||||
background: #81a1c1;
|
||||
}
|
||||
|
||||
|
||||
@ -12,9 +11,9 @@ h1 {
|
||||
}
|
||||
|
||||
a {
|
||||
color: #f2d5cf;
|
||||
color: #ebcb8b;
|
||||
text-decoration: none;
|
||||
font-style: bold;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
@ -23,8 +22,9 @@ a:hover {
|
||||
}
|
||||
|
||||
code {
|
||||
background: #414559;
|
||||
background: #88c0d0;
|
||||
border-radius: 10px;
|
||||
font-size: 105%;
|
||||
font-style: italic;
|
||||
padding: 2px;
|
||||
}
|
||||
|
10
upfast.service
Normal file
10
upfast.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=UpFast service
|
||||
Documentation=https://code.cronyakatsuki.xyz/crony/upfast
|
||||
|
||||
[Service]
|
||||
User=upfast
|
||||
Group=upfast
|
||||
WorkingDirectory=/usr/local/upfast/
|
||||
ExecStart=/usr/local/upfast/env/bin/uvicorn main:app --host 127.0.0.1 --port 8000 --proxy-headers --forwarded-allow-ips='*'
|
||||
Restart=on-failure
|
27
upfast.sh
Executable file
27
upfast.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
# quick install (and run) script for upfast using systemd
|
||||
if [ $EUID -ne 0]
|
||||
then
|
||||
echo "Please run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp ./upfast.service /etc/systemd/system/upfast.service
|
||||
|
||||
useradd --shell /bin/sh --system --home-dir /usr/local/upfast upfast
|
||||
mkdir -p /usr/local/upfast # dodge copying of skeletons
|
||||
|
||||
chown upfast:upfast /usr/local/upfast
|
||||
chmod 700 /usr/local/upfast
|
||||
|
||||
su upfast -c'
|
||||
cd
|
||||
git clone https://git.craftmenners.men/upfast .
|
||||
|
||||
python3 -m venv env
|
||||
. ./env/bin/activate
|
||||
pip install -r requirements.txt
|
||||
mkdir upload '
|
||||
|
||||
systemctl enable --now upfast.service
|
Loading…
Reference in New Issue
Block a user