getting there
This commit is contained in:
40
README.md
40
README.md
@@ -3,31 +3,39 @@
|
||||
A mini file sharing website.
|
||||
|
||||
|
||||
# installation
|
||||
|
||||
- `bash create_config.sh`
|
||||
- `docker-compose up --build`
|
||||
|
||||
# configuration
|
||||
|
||||
- configure service with data/config.json
|
||||
- Change your `app_secret_key` !!
|
||||
- Change your `access_token` !!
|
||||
- Change your `public_url`
|
||||
- Change your `timezone`
|
||||
- `uid` = user id for new files
|
||||
- `workers` = parallel processes (i.e. one upload reserves a process)
|
||||
- `timeout` = timeout for processes, single upload might take a long time!
|
||||
- configure bind host and port in .env
|
||||
Configure service with .env:
|
||||
|
||||
```
|
||||
EXPOSE=0.0.0.0:8136 # IP/Port to bind
|
||||
UID=1000 # files will be written as user
|
||||
GID=1000 # files will be writter as group
|
||||
TZ=Europe/Helsinki # your timezone
|
||||
WORKERS=4 # number of concurrent processes
|
||||
FLASK_APP_SECRET_KEY=8a36bfea77d842386a2a0c7c3e044228363d # Key that encrypts cookies
|
||||
FLASK_ACCESS_TOKEN=dff789f0bbe8183d3254258b33a147d5 # Key used in request headers to allow upload etc.
|
||||
FLASK_PUBLIC_URL=http://localhost:8136 # Public url
|
||||
FLASK_DEFAULT_EXPIRE=2592000 # Default seconds to expire files
|
||||
FLASK_DEFAULT_MAX_DL=9999 # Default maximum download times
|
||||
```
|
||||
|
||||
- proxy with nginx, match bind port, body size and timeout to your needs:
|
||||
```
|
||||
location /flees/ {
|
||||
location /mfl/ {
|
||||
proxy_pass http://localhost:8136/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_set_header X-Script-Name /flees;
|
||||
proxy_set_header X-Script-Name /mfl;
|
||||
client_max_body_size 8G;
|
||||
client_body_timeout 3600s;
|
||||
}
|
||||
```
|
||||
|
||||
# Running
|
||||
|
||||
- `docker-compose up --build`
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user