Skip to content

部署

实战-docker部署全网最美个人相册machete-2024.12.19(测试成功)

image-20241219065243694

目录

[toc]

版权

本着开源共享、共同学习的精神:

本文是根据 开源站点:《家庭相册-filesite-io》里提供的部署文档进一步编辑输出的 ,具体信息请看 原作者github开源仓库。转载无需和我联系,但请注明文章来源。如果侵权之处,请联系博主进行删除,谢谢~

官网:https:vmwareworkstation里一台centos7.61810虚机,192.168.1.100,能通公网(nat模式)

源码

通过百度网盘分享的文件:filesite-machete-2024.8.13.tar.gz 链接:https:mkdir-p/root/machete/photomkdir-p/root/machete/runtime/cd/root/machetecat>/root/machete/docker-compose.yaml<<EOFversion:"3"services:mtphotos:image:filesite/machetecontainer_name:macheterestart:alwaysports:- 1081:80- 445:445volumes:- /root/machete/photo:/var/www/machete/www/girls- /root/machete/runtime:/var/www/machete/runtimeEOF#自定义配置cat>/root/machete/runtime/custom_config.json<<EOF{"theme":"beauty","content_directory":"girls/","enableSmallImage":false,"showQRImageInFooter":false,"adminForLanIps":true,"adminWhiteIps":["127.0.0.1","192.168.1.100","183.192.139.190"],"slide_show_timeout":5,"showVersion":true}EOF#自定义加密目录cat>/root/machete/runtime/custom_password.json<<EOF{"password_auth":{"enable":true,"default":"","allow":{"5-加密目录":"123456"}}}EOF#设置权限chmod-R777runtime/dockerpullfilesite/machetedocker-composeup-ddockerps#备注:#photo:存放本地相册数据的;#runtime目录用来缓存相册封面、缩略图、缓存的,这里做了持久化,即使以后容器删除后,再次新起的容器,相册封面也是在的;(目录封面图缓存和缩略图缓存都在目录runtime/cache里)

配置文件相关选项含义说明:

在浏览器访问http:mkdir-p/root/machete/photomkdir-p/root/machete/runtime/cd/root/machetecat>/root/machete/docker-compose.yaml<<EOFversion:"3"services:mtphotos:image:filesite/machetecontainer_name:macheterestart:alwaysports:- 1081:80- 445:445volumes:- /root/machete/photo:/var/www/machete/www/girls- /root/machete/runtime:/var/www/machete/runtimeEOF#自定义配置cat>/root/machete/runtime/custom_config.json<<EOF{"theme":"beauty","content_directory":"girls/","enableSmallImageForWan":"true","showQRImageInFooter":false,"adminForLanIps":true,"adminWhiteIps":["127.0.0.1","192.168.1.100","183.192.139.190"],"slide_show_timeout":5,"showVersion":true}EOF#自定义加密目录cat>/root/machete/runtime/custom_password.json<<EOF{"password_auth":{"enable":true,"default":"","allow":{"5-加密目录":"123456"}}}EOF#设置权限chmod-R777runtime/dockerpullfilesite/machetedocker-composeup-ddockerps#备注:#photo:存放本地相册数据的;#runtime目录用来缓存相册封面、缩略图、缓存的,这里做了持久化,即使以后容器删除后,再次新起的容器,相册封面也是在的;(目录封面图缓存和缩略图缓存都在目录runtime/cache里)

含义说明:

vim /etc/nginx/conf.d/photo.onedayxyy.cn.conf

image-20241218100855805

image-20241218101020524

image-20241218101058453

本次相册配置:

image-20241218101139966

image-20241218101158933

image-20241218101234684

image-20241218101250155

https:t="1711730357270" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4392" width="16" height="16" >打赏支持