Compare commits
No commits in common. "b8dd31abfed79b97b1349c2f8bc9f9527b8d0dfa" and "e68a44e750c47845afd1122322cd13686cd45759" have entirely different histories.
b8dd31abfe
...
e68a44e750
@ -1,4 +0,0 @@
|
||||
__pycache__
|
||||
upload
|
||||
venv
|
||||
.git
|
13
Dockerfile
13
Dockerfile
@ -1,13 +0,0 @@
|
||||
FROM python:3.10-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY requirements.txt ./
|
||||
|
||||
RUN apk add --no-cache --update libmagic \
|
||||
&& pip install --no-cache-dir --upgrade pip \
|
||||
&& pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
34
README.md
34
README.md
@ -1,37 +1,3 @@
|
||||
# UpFast
|
||||
|
||||
simple tool to host file upload and sharing.
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
```bash
|
||||
# Create the virtual environment
|
||||
python -m venv venv
|
||||
|
||||
# Activate the virtual environment
|
||||
source venv/bin/activate
|
||||
|
||||
# Install all the requirements
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Run the project
|
||||
uvicorn main:app --host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
The sample command will need a upload directory to where you run it from so you can replace ./upload with a different path to save uploaded stuff.
|
||||
|
Loading…
Reference in New Issue
Block a user