Sign inSign up

12abcloud/store-service

By 12abcloud

Updated almost 7 years ago

small HTTP upload and download service

Image
0

1.4K

12abcloud/store-service repository overview

store-service

 

Pre requirements

For hosting your own tiny-link instance you only need docker installed. Here you find a short documentation how to install docker.

 

How to run

Docker run

for having the shorted links, also after a restart available we mount the path where the links are saved to our local file system(with -v ).

docker run -d --restart unless-stopped -p 8111:8080 -v /data/store-service/:/store/ 12abcloud/store-service

 

Api test via curl
curl --upload-file /var/log/syslog http://localhost:8111/syslog

 

response:
http://localhost:8111/syslog

Environment variables

Environment variables can get set with the -e parameter, like docker run -e DEFAULT_STORE_DUR=7d 12abcloud/store-service

VariableDescriptionDefault
DEBUGactivate the debug loggingfalse
STORE_PATHpath where the files are getting stored/store
HTTP_PATHURL path for the http api/
HTTP_PROTOprotocoll to use for the return stringhttp
DEFAULT_STORE_DURdefault store time (m, h)24h
ENCRYPTencrypt stored files on diskfalse

 

Example commands

use the following commands to upload files:

Simple upload with default valid duration
# create
curl --upload-file 50MB.zip http://localhost:8111/50MB.zip
Specify your own valid duration, possible units are s(seconds), m(minutes), h(hours)
# create
curl -H 'X-valid: 400h' --upload-file 50MB.zip http://localhost:8111/50MB.zip
Specify your your own key for encrypting:
# create
curl -u 'USERNAME :PASSWORD ' --upload-file 50MB.zip http://localhost:8111/50MB.zip
# get
wget --http-user=USERNAME --http-password=PASSWORD http://localhost:8111/50MB.zip

make a one time file
curl -H 'onetime: true' --upload-file 50MB.zip http://localhost:8111/50MB.zip

Tag summary

Content type

Image

Digest

Size

11.8 MB

Last updated

almost 7 years ago

docker pull 12abcloud/store-service