16.6k stars 开源的本地文件共享传输工具 docker部署教程

Install

First, Install docker with docker-compose.

Then, clone the repository:

复制代码
    git clone https://github.com/RobinLinus/snapdrop.git
    cd snapdrop
    docker-compose up -d

Now point your browser to http://localhost:8080.

  • To restart the containers run docker-compose restart.
  • To stop the containers run docker-compose stop.
  • To debug the NodeJS server run docker logs snapdrop_node_1.

Run locally by pulling image from Docker Hub

Have docker installed, then use the command:

复制代码
    docker pull linuxserver/snapdrop

To run the image, type (if port 8080 is occupied by host use another random port :80):

复制代码
    docker run -d -p 8080:80 linuxserver/snapdrop

PWAs require that the app is served under a correctly set up and trusted TLS endpoint.

The nginx container creates a CA certificate and a website certificate for you. To correctly set the common name of the certificate, you need to change the FQDN environment variable in docker/fqdn.env to the fully qualified domain name of your workstation.

If you want to test PWA features, you need to trust the CA of the certificate for your local deployment. For your convenience, you can download the crt file from http://<Your FQDN>:8080/ca.crt. Install that certificate to the trust store of your operating system.

  • On Windows, make sure to install it to the Trusted Root Certification Authorities store.
  • On MacOS, double click the installed CA certificate in Keychain Access, expand Trust, and select Always Trust for SSL.
  • Firefox uses its own trust store. To install the CA, point Firefox at http://<Your FQDN>:8080/ca.crt. When prompted, select Trust this CA to identify websites and click OK.
  • When using Chrome, you need to restart Chrome so it reloads the trust store (chrome://restart). Additionally, after installing a new cert, you need to clear the Storage (DevTools -> Application -> Clear storage -> Clear site data).

Please note that the certificates (CA and webserver cert) expire after a day. Also, whenever you restart the nginx docker, container new certificates are created.

The site is served on https://<Your FQDN>:443.

Deployment Notes

The client expects the server at http(s)://your.domain/server.

When serving the node server behind a proxy, the X-Forwarded-For header has to be set by the proxy. Otherwise, all clients that are served by the proxy will be mutually visible.

By default, the server listens on port 3000.

For an nginx configuration example, see docker/nginx/default.conf.

参考地址:docs/local-dev.md · AscendKing/snapdrop - Gitee.com

相关推荐
喜欢你,还有大家1 小时前
k8s集群监控的部署
云原生·容器·kubernetes
霍格沃兹测试开发学社-小明2 小时前
AI来袭:自动化测试在智能实战中的华丽转身
运维·人工智能·python·测试工具·开源
喜欢你,还有大家3 小时前
实战演练——wordpress-k8s集群版
云原生·容器·kubernetes
德育处主任3 小时前
『NAS』轻松获取群晖自带的壁纸
服务器·docker
●VON4 小时前
开源 vs 商业:主流AI生态概览——从PyTorch到OpenAI的技术格局之争
人工智能·pytorch·开源
e***87704 小时前
Node.js 与 Docker 深度整合:轻松部署与管理 Node.js 应用
docker·容器·node.js
k***12175 小时前
开源模型应用落地-FastAPI-助力模型交互-进阶篇-中间件(四)
开源·交互·fastapi
q***71015 小时前
从零到上线:Node.js 项目的完整部署流程(包含 Docker 和 CICD)
docker·容器·node.js
ArabySide6 小时前
【ASP.NET Core】ASP.NET Core应用的Docker容器化与阿里云托管
阿里云·docker·asp.net
好奇的菜鸟8 小时前
在 WSL 中安装 Docker
运维·docker·容器