{"id":13456387,"url":"https://github.com/filesite-io/machete","last_synced_at":"2026-02-22T15:30:10.539Z","repository":{"id":43103692,"uuid":"495771060","full_name":"filesite-io/machete","owner":"filesite-io","description":"PHP实现的无数据库、基于文件和目录的Markdown文档、网址导航、图片、视频网站、视频分享网站开源系统。","archived":false,"fork":false,"pushed_at":"2025-06-09T01:20:06.000Z","size":2178,"stargazers_count":55,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-09T02:20:42.176Z","etag":null,"topics":["article-hosting","dir-scanner","image-host","image-hosting","mannual-hosting","markdown-to-html","markdown-to-website","markdown-website","open-source","photo-management","photo-shareing","video-directory","video-favorite","video-hosting","video-sharing","web-directory"],"latest_commit_sha":null,"homepage":"https://filesite.io","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filesite-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-24T10:17:15.000Z","updated_at":"2025-06-09T01:20:09.000Z","dependencies_parsed_at":"2024-05-31T08:01:22.367Z","dependency_job_id":"94b840f2-397d-4725-bfd4-56a4ebe806e7","html_url":"https://github.com/filesite-io/machete","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/filesite-io/machete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filesite-io%2Fmachete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filesite-io%2Fmachete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filesite-io%2Fmachete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filesite-io%2Fmachete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filesite-io","download_url":"https://codeload.github.com/filesite-io/machete/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filesite-io%2Fmachete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29717204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["article-hosting","dir-scanner","image-host","image-hosting","mannual-hosting","markdown-to-html","markdown-to-website","markdown-website","open-source","photo-management","photo-shareing","video-directory","video-favorite","video-hosting","video-sharing","web-directory"],"created_at":"2024-07-31T08:01:21.045Z","updated_at":"2026-02-22T15:30:10.529Z","avatar_url":"https://github.com/filesite-io.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Filesite/Machete\n\n一个实现了FileSite.io “基于文件和目录管理网址、文章、图片、视频标准”的开源PHP源码。\n\n可以用它快速搭建：\n\n* 图片网站\n* 视频网站\n* 文档/文章/博客网站\n* 导航网站，视频收藏/分享网站\n\n\n## 目录\n\n* [在线体验](#在线体验)\n* [基于Docker Compose部署](#基于docker-compose部署)\n* [基于Docker部署](#基于docker部署)\n    * [视频教程](#视频教程)\n    * [下载镜像](#下载镜像)\n    * [启动machete容器](#启动machete容器)\n    * [查看容器](#查看容器)\n    * [升级容器代码](#升级容器代码)\n    * [配置修改](#配置修改)\n* [手动部署](#手动部署)\n* [常见问题与解答](#常见问题与解答)\n* [联系方式](#联系方式)\n\n\n## 在线体验\n\nMachete是单入口模式PHP源码，**不支持子目录方式访问**，以下示例都是以子域名或根域名配置nginx根目录指向代码目录下的www/index.php。\n\n\n  | 类型 | 名称 | 网址 |\n| ---- | ---- | ---- |\n| 图片站 | 家庭相册演示 | \u003ca href=\"https://demo.jialuoma.cn\" target=\"_blank\"\u003eDemo\u003c/a\u003e |\n| 视频分享站 | Ta荐 | \u003ca href=\"https://tajian.tv\" target=\"_blank\"\u003eTaJian.tv\u003c/a\u003e |\n| 文档站 | FileSite | \u003ca href=\"https://filesite.io\" target=\"_blank\"\u003eFilesite.io\u003c/a\u003e |\n| 导航站 | 站长手册 | \u003ca href=\"https://webdirectory.filesite.io\" target=\"_blank\"\u003eWebDir\u003c/a\u003e |\n\n\n## 基于Docker Compose部署\n\n如果你已经安装了Docker Desktop，并确认已经支持docker compose命令，可**进入本源码根目录**后执行以下命令进行安装：\n\n```\n# cd /machete源码根目录/\ndocker compose up -d\n```\n\n如果你是在支持docker compose的NAS系统里安装，请参考下面配置：  \n[Docker Compose配置参考](./compose.yaml)\n\n\n注意启动容器之前先修改配置里的本地照片、视频文件夹路径：\n```\n  - \"${PWD}/www/girls:/var/www/machete/www/girls/\"\n```\n\n把其中的\"${PWD}/www/girls“修改为你本地照片目录绝对路径。\n\n\n## 基于Docker部署\n\n在Docker中如何用filesite/machete源码快速搭建支持文件/目录管理内容的图片网站、视频网站、导航网站和文档站的视频教程。\n\n主要步骤：\n1. docker pull filesite/machete\n2. docker run ...\n3. 本地测试网站\n4. 在docker容器中升级最新版\n\n\n### 视频教程\n\n点击下面图片观看如何使用Docker部署安装machete的视频教程（视频中的后台已停止维护，新版不含后台）。\n\n[![用Docker安装machete](https://static.jialuoma.cn/img/video_docker_pull_run_machete_1210_snap.png)](https://static.jialuoma.cn/mp4/video_docker_pull_run_machete_1210.mp4)\n\n\n管理相册里的目录及照片，只需维护本地照片目录，按自己的需要对照片用目录进行分类；  \n如果需要把相册系统部署到远程服务器，建议只维护本地照片目录再通过自动同步软件把本地照片目录同步到远程服务器对应的文件夹。\n\n免费同步软件参考：[FreeFileSync](https://freefilesync.org/)\n\n\n### 下载镜像\n\n从dockerhub下载：\n```\ndocker pull filesite/machete\n```\n\n如果不能直接访问dockerhub，可从备用网址下载镜像后导入：\n```\nwget https://static.jialuoma.cn/docker_images/machete.tar\ndocker image load -i machete.tar\n```\n\n\n### 启动machete容器\n\n```\ndocker run --name machete -p 1080:80 -itd filesite/machete [皮肤名]\n```\n\n\n其中皮肤名称可选值：\n\n```\n[\n    'beauty',           //图片网站，设计精美\n    'tajian',           //视频分享网站\n    'manual',           //文档网站\n    'webdirectory',     //导航网站\n]\n```\n\n本地监听端口``1080``请根据自己需要修改。\n\n\nmachete在容器中的目录：\n\n```\n/var/www/machete/\n```\n\n可根据自己的需要，通过``-v``参数映射本地内容目录到容器目录，\n示例如下：\n```\ndocker run --name machete -p 1080:80 \\\n    -v /d/图片目录/:/var/www/machete/www/girls/ \\\n    -itd filesite/machete \\\n    beauty\n```\n\n这样可以通过更新本地内容目录```/d/图片目录/```的文件来实时更新网站内容。\n\n不同皮肤对应的容器目录如下：\n\n| 皮肤名 | 容器目录 |\n| ---- | ---- | ---- |\n| beauty | /var/www/machete/www/girls/ |\n| tajian | /var/www/machete/www/tajian/ |\n| manual | /var/www/machete/www/content/ |\n| webdirectory | /var/www/machete/www/navs/ |\n\n\n如果开启Imagick库支持，请在启动容器的时候根据你的服务器配置，指定容器最大能使用的内存和cpu数量。\n\n例如***1G内存双核cpu服务器***，允许最大使用512M内存，1.5个cpu核心：\n```\ndocker run --name machete -p 1080:80 \\\n    -m 512m \\\n    --cpus=\"1.5\" \\\n    -v /d/图片目录/:/var/www/machete/www/girls/ \\\n    -itd filesite/machete \\\n    beauty\n```\n\n\n### 查看容器\n\n```\ndocker ps\n```\n\n如果看到名字为``machete``的容器正在运行，说明容器启动完成，访问本地网址测试：\n\n```\nhttp://127.0.0.1:1080\n```\n\n\n### 升级容器代码\n\n```\ndocker exec -it machete /var/www/machete/bin/upgrade.sh\n```\n\n\n### 配置修改\n\n修改配置有两种方式：\n1. 进入容器目录：/var/www/machete/runtime/，修改**custom_config.json**后保存即可；\n2. 命令行修改\n```\ndocker exec -it machete php /var/www/machete/bin/command.php config \"do=set\u0026key=screenshot_start\u0026val=1000\"\n```\n\n上述命令为修改配置项**screenshot_start**的示例。\n\n配置读取、修改、删除命令：\n```\nphp /var/www/machete/bin/command.php config \"参数\"\n```\n\n参数说明：\n* do  - 操作，可选值：get, all, set, del（分别对应获取单个配置项、所有配置项、设置单个配置项、删除单个配置项）\n* key - 配置项名称\n* val - 配置项值\n\n\n说明：\n不支持数组类型的配置修改，可用配置项明细参考：**conf/app.php**。\n\n\n## 手动部署\n\n视频教程：\n\n[![手动配置Nginx部署machete](https://static.jialuoma.cn/img/machete/setup_nginx_conf.jpg)](https://static.jialuoma.cn/mp4/machete/setup_nginx_conf.mp4)\n\n\nMachete使用非常简单，一旦部署好之后，以后只需将本地最新内容上传覆盖即可。\n\n1. 下载Machete源码，并参考[Nginx配置示例](./conf/nginx_machete.conf)部署到你的服务器上；\n\n  说明：\n\n  Machete**不支持子目录方式访问**，需要为nginx配置根目录指向代码目录下的www/。\n  \n  用git下载：\n```\ngit clone https://git.filesite.io/filesite/machete.git\n```\n  或下载zip压缩包（[点我直接下载](https://git.filesite.io/filesite/machete/archive/master.zip)）：\n```\nhttps://git.filesite.io/filesite/machete/archive/master.zip\n```\n\n2. 修改配置文件``config/app.php``，简单设置后上传到服务器完成部署；\n\n  指定内容目录和使用的皮肤：\n```\n'content_directory' =\u003e 'content/',      //内容存放目录\n'theme' =\u003e 'manual',                    //皮肤名称，如：文档站选manual，图片站选googleimage\n```\n\n还可以复制conf/目录下的custom_config_皮肤名.json到runtime/目录，\n通过修改runtime/custom_config.json或者runtime/custom_config_皮肤名.json来设置当前网站使用的皮肤名和内容目录。\n\n\n3. 将本地内容目录及文件上传到网站目录：``www/content/``\n\n  不同皮肤请上传到对应的目录，不同类型的网站数据格式参考：[Machete使用手册](./www/content/Machete_Doc.md)。\n\n4. 打开网址浏览最新内容；\n\n有了Machete，你可以保留现有的本地内容创作习惯，并非常容易地把它们制作成一个网站分享给他人。\n\n\n补充说明：\n\n由于按年、月归类文件功能需要在服务器端执行php脚本来扫描图片、视频等，手动部署后需要进入项目根目录并执行以下命令扫描所有图片、视频：\n```\nphp bin/command.php mainBot\n```\n\n\n\n## 常见问题与解答\n\n请参考文档：\n* [Machete家庭相册系统使用FAQ常见问题](./FAQ.md)\n\n\n## 联系方式\n\n请打开官方网站查看底部QQ群和微信：\n\u003ca href=\"https://filesite.io\" target=\"_blank\"\u003eFileSite.io\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilesite-io%2Fmachete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilesite-io%2Fmachete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilesite-io%2Fmachete/lists"}