• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

bneijt/ipfs-video-gateway: Docker image to host IPFS HTTP gateway with support f ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

bneijt/ipfs-video-gateway

开源软件地址:

https://github.com/bneijt/ipfs-video-gateway

开源编程语言:

Python 59.5%

开源软件介绍:

Easily host files on IPFS

A docker container containing an HTTP gateway and IPFS node to easily host files on IPFS.

You run the docker container with a shared volume for the ipfs storage. If you add files to the volume, they are added to ipfs, pinned and deleted.

Installation

The software is packages as a docker container. Pick any of the following options to start the docker container.

Locally

Test run with docker run --volume /srv/ipfs:/ipfs --publish 4000:80 bneijt/ipfs-video-gateway and visit localhost:4000 to view the front-end.

If you like it, use daemonize and restart to make it more permanent:

docker run --volume /srv/ipfs:/ipfs --publish 4000:80 -d --restart=always bneijt/ipfs-video-gateway

Using cloud-init to provision on server creation

You can use cloud-init to configure a Scaleway server and have everything automatically done.

Copy paste the following cloud-init in the Configure advanced options section of the Scaleway new server form:

#cloud-config
packages:
  - docker.io
runcmd:
  - "docker run --volume /srv/ipfs:/ipfs --publish 80:80 -d --restart=always bneijt/ipfs-video-gateway"

After starting the server, wait for a few minutes for the system to update, install and configure.

Usage

The docker container will check to see if there are files in /ipfs every 10 seconds or so. If there is a directory of file, and none of the files are hidden or end with .part it will add the files to IPFS and delete the folder.

If you have provisioned a server using cloud-init, you can rsync files to it using:

rsync --progress -r folder_to_add root@ip_of_server:/srv/ipfs/

of if you are running the files locally, use rsync --progress -r folder_to_add /srv/ipfs/. Remember: files in /srv/ipfs will be deleted after adding them to the ipfs index.

If you have not used --volume when starting docker, you can upload the files into the container using docker cp

docker ps # to find out the container id
docker cp directory container_id:/ipfs

Development

Update files in src, test using test.sh




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap