forked from crony/UpFast
Compare commits
No commits in common. "a72cd1a0398961b766038f378ec964a0ee1fd7a7" and "4bbed566004e9e793233074574e76d427d6ccc32" have entirely different histories.
a72cd1a039
...
4bbed56600
29
README.md
29
README.md
@ -1,6 +1,6 @@
|
|||||||
# UpFast
|
# UpFast
|
||||||
|
|
||||||
Simple tool for uploading and sharing files that you can self-host.
|
simple tool for uploading and sharing files that is selfhostable.
|
||||||
|
|
||||||
## How to host
|
## How to host
|
||||||
|
|
||||||
@ -15,27 +15,28 @@ We will also be setting up an specific user to run the app as safe as possible w
|
|||||||
sudo useradd --shell /bin/bash --system \
|
sudo useradd --shell /bin/bash --system \
|
||||||
--home-dir "/usr/local/upfast" -m upfast
|
--home-dir "/usr/local/upfast" -m upfast
|
||||||
|
|
||||||
# Change to upfast user and go to upfast dir
|
# Change to upfast user and cd /usr/local/upfast
|
||||||
su upfast
|
su upfast
|
||||||
cd
|
cd /usr/local/upfast
|
||||||
|
|
||||||
# Clone the project directly into upfast-src directory
|
# Clone the project directly into upfast-src directory
|
||||||
git clone https://code.cronyakatsuki.xyz/crony/upfast .
|
git clone https://code.cronyakatsuki.xyz/crony/upfast upfast-src
|
||||||
|
|
||||||
# Create the virtual environment and load it for user on default
|
# Create the virtual environment and load it for user on default
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
|
echo "source /usr/local/upfast/venv/bin/activate" > "/usr/local/upfast/.profile"
|
||||||
|
|
||||||
# Activate the virtual environment
|
# Activate the virtual environment
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
# Install all the requirements
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
# Load environment by default
|
# Install all the requirements
|
||||||
echo "source /usr/local/upfast/venv/bin/activate" > "/usr/local/upfast/.profile"
|
cd upfast-src/
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# create the upload directory
|
# create the upload directory
|
||||||
mkdir upload
|
mkdir upload
|
||||||
|
|
||||||
# UpFast go brrr
|
# Run the project
|
||||||
uvicorn main:app --host 127.0.0.1 --port 8000 --proxy-headers --forwarded-allow-ips='*'
|
uvicorn main:app --host 127.0.0.1 --port 8000 --proxy-headers --forwarded-allow-ips='*'
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -51,18 +52,12 @@ Documentation=https://code.cronyakatsuki.xyz/crony/upfast
|
|||||||
[Service]
|
[Service]
|
||||||
User=upfast
|
User=upfast
|
||||||
Group=upfast
|
Group=upfast
|
||||||
WorkingDirectory=/usr/local/upfast/
|
WorkingDirectory=/usr/local/upfast/upfast-src
|
||||||
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/venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000 --proxy-headers --forwarded-allow-ips='*'
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
```
|
```
|
||||||
Finally run following commmands.
|
|
||||||
|
|
||||||
```
|
Then just run `sudo systemctl daemon-reload` and enable the service with `sudo systemctl enable upfast.service`
|
||||||
# refresh services
|
|
||||||
`sudo systemctl daemon-reload`
|
|
||||||
# enable the service
|
|
||||||
`sudo systemctl enable upfast.service`
|
|
||||||
```
|
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user