Google Photo uploader Docker for Synology

2018-12-24 20:31:09 +08:00
 muyouming

终于搞定了群晖里的照片自动上传到 Google photos,也给大家分享一下。

本 docker 实现的功能:

  1. 上传照片或者视频,并监控文件夹内文件的变化,有新增则自动上传
  2. 忽略 "@eaDir" 文件夹的内容
  3. 支持 socks5

如何安装:

  1. docker pull muyouming/gphotosuploader

  2. get google cookie by using chrome extension by refer to here.

  3. run docker in privillage mode, and set the photo folder to /photo.

  4. input the cookie string in docker env COOKIES

  5. if proxy needed ,please change the docker enviroments SOCKS5_PROXY to your proxy, if no proxy needed ,pease delete the enviroments http_proxy and https_proxy.

  6. run ,and this uploader will monitor all changes in your /photo folder, and upload to your google photo storage. if you see "Watching " in log ,it means everything works right.

  7. if this folder is new and you needto upload all, you can go to the terminal and start a bash ,then execute: gphotosuploader --upload /photo --maxConcurrenct 4 this comamnd will upload all your photos and videos in /photo .

enjoy.

不知道怎么发图,请大家移步 github 去看有图的说明:

https://github.com/muyouming/gphotosuploader/tree/master/docker

目前已经测试 2 天,没发现什么大的 bug。欢迎大家吐槽。

2289 次点击
所在节点    NAS
33 条回复
est
2018-12-25 14:28:07 +08:00
@muyouming

IMPORTANT NOTICE: as of 2018/09/01 this project is going to be deprecated, since Google now released an official google photos API.


要挂了?
muyouming
2018-12-25 18:29:12 +08:00
@est 目前还能用,未来难说
znf
2019-02-19 14:13:22 +08:00
@muyouming 求助,按照步骤部署后,docker 刚起来就很快报错退出,看日志提示是:/bin/bash: run.sh: No such file or directory
删除后用 SSH 连接尝试手动运行容器,同样无法使用,查看日志是一样的问题。挂载其他文件夹也试过了,实在不知道是怎么解决了……
faketemp
2019-03-09 13:22:22 +08:00
@znf 同样问题,按照设置说明完成后,启动失败,提示 /bin/bash: run.sh: No such file or directory
@muyouming
muyouming
2019-03-10 11:24:03 +08:00
已经修复,docker hub 的自动 build 看来我还是没用好,我替换成 local build 了,你们再试以下。
faketemp
2019-03-10 13:42:41 +08:00
@znf 经过一个多小时的研究成功解决问题

方案如下,留个记录给有需要的 V 友:
注意,按照 @muyouming 在 github 的截图步骤设置完后,需要最后增加一个步骤!!!!
点击已安装的 Docker 映像,启动——高级设置——环境——执行命令:修为默认的“/bin/bash run.sh ”命令为"/bin/bash /go/src/app/docker/run.sh"
faketemp
2019-03-10 13:45:49 +08:00
@muyouming 再反馈一个小问题:
github 页面第 7 点描述中的命令有误—— maxConcurrent 写成了 maxConcurrenct,直接复制使用也可以导致命令运行失败哦
muyouming
2019-03-10 15:18:50 +08:00
@faketemp github 上已修改。
现在最新的 docker 已经好了吧,不用改 run 命令了吧。
faketemp
2019-03-10 16:51:57 +08:00
已安装旧版,主功能一致懒得更新啦,既然修改下命令就可以用起 就没有测试最新版还 😄
@muyouming 看了一下,README.md 已更新 谢谢辛苦付出
toyst
2019-03-20 15:09:42 +08:00
多个目录怎么添加呢?
toyst
2019-03-21 10:05:22 +08:00
新建的子目录第一个文件无法监视上传
`2019/03/21 01:21:48 Finally consuming events for the /photo/Mobile/Redmi 4/DCIM/2019-03-21 file`
toyst
2019-03-28 09:00:58 +08:00
@serenader 我也是这样,但是图片一多了( 2 万+),走 smb 协议就有些慢,有时照片上传 1、2 周都还没同步,不能实时监控是个问题
znf
2019-04-18 09:25:21 +08:00
@faketemp 非常感谢,我抽空试试看。我上次研究了半天没有头绪,还是水平太菜啊

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/520609

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX