UpFast/README.md

52 lines
1.3 KiB
Markdown
Raw Normal View History

2023-03-23 21:00:39 +01:00
# UpFast
2023-03-26 16:03:38 +02:00
Simple tool for uploading and sharing files that you can self-host.
## How to host
### Regular system
To run on a regular system I recommend to use a virtual environment to install the dependencies and run the project from there.
We will also be setting up an specific user to run the app as safe as possible with a systemd service file for startup
2023-04-05 12:55:15 +02:00
#### Installing
```bash
2023-04-05 12:55:15 +02:00
./install.sh
```
2023-04-05 12:55:15 +02:00
#### Running
```bash
systemctl start upfast.service
```
2023-04-05 12:55:15 +02:00
#### Start on boot
2023-03-26 17:30:38 +02:00
```bash
2023-04-05 12:55:15 +02:00
systemctl enable upfast.service
2023-03-26 16:03:38 +02:00
```
### Docker
In the repo there is an included dockerfile to generate an image from the latest version of everything, to generate an image just run `docker build . -t upfast` (You need root privileges or to be in the docker group).
To run the docker container check the container id with `docker images` command.
> sample docker run command
```bash
sudo docker run -p 8000:8000 -v ./upload:/usr/src/app/upload CONTAINER_ID
```
2023-03-26 12:27:02 +02:00
The sample command will need an upload directory, you can replace `./upload` with a different path to save uploaded stuff.
### Nginx Proxy setup
This is an example nginx proxy config for http
2023-04-05 12:55:15 +02:00
```bash
cp ./upfast-nginx /etc/nginx/sites-available/upfast
ln -sf /etc/nginx/sites-available/upfast /etc/nginx/sites-enabled/
```
2023-04-05 12:58:28 +02:00
> Load config
```bash
systemctl reload nginx
```