https://github.com/nikstar/pear
File server that allows downloading zipped folders
https://github.com/nikstar/pear
Last synced: 2 months ago
JSON representation
File server that allows downloading zipped folders
- Host: GitHub
- URL: https://github.com/nikstar/pear
- Owner: nikstar
- Created: 2023-03-12T22:20:59.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-13T10:43:47.000Z (about 2 years ago)
- Last Synced: 2025-02-05T11:44:48.497Z (4 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pear 🍐
Pear is a simple file server web app built with Flask that allows downloading files and zipped directories.
## Getting Started
To get started with Pear, you can clone the repository and run the following command:
```sh
git clone https://github.com/nikstar/pear.git
cd pear
pip install -r requirements.txt
flask run # or python app.py
```This will start the server and you can access it by going to in your web browser.
## Usage
By default, Pear serves files from the current directory. You can change this by setting the FILE_ROOT environment variable.
```sh
export FILE_ROOT=/path/to/your/files
flask run
```You can also specify a custom app root by setting the APP_ROOT environment variable. This allows you to serve Pear under a subpath on your domain.
```sh
export APP_ROOT=/pear
flask run
```## Docker
Run Pear with Docker:
```sh
docker run -p 5000:5000 -e APP_ROOT=/myapp -v /path/to/data:/data nikstar/pear:latest
```### Build from source
Clone the repository and navigate to the project directory.
```sh
git clone https://github.com/nikstar/pear.git
cd pear
```Build the Docker image.
```sh
docker build -t pear .
```Start the container.
```sh
docker run -p 5000:5000 -e APP_ROOT=/myapp -v /path/to/data:/data pear
```### Using docker-compose
Use `docker-compose.yml` from this repository or create your own::
```yaml
version: "3.9"
services:
pear:
image: nikstar/pear
environment:
APP_ROOT: /myapp
volumes:
- /path/to/data:/data
ports:
- "5001:5000"
```Start the container with docker-compose.
```sh
docker-compose up
```This will start Pear on port 5001 and you can access it by going to in your web browser.
## License
Pear is released under the MIT License.