├── .gitignore ├── .dockerignore ├── script └── docker-start.sh ├── LICENSE ├── Dockerfile ├── .github └── workflows │ └── finderweb.yml └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | data 2 | conf 3 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | README.md 2 | LICENSE -------------------------------------------------------------------------------- /script/docker-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | volume_root="/tmp-finderweb-data" 4 | volume_conf="${volume_root}/finderweb" 5 | 6 | # 2.5.5 7 | # app_conf="/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/META-INF" 8 | 9 | app_conf="/usr/local/tomcat/webapps/ROOT/WEB-INF/finderweb" 10 | # 处理首次共享目录 11 | if [ ! -d "${app_conf}/user/" ]; then 12 | cp -r ${volume_conf}/* ${app_conf}/ 13 | fi 14 | 15 | exec "$@" 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 aogg 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM tomcat:jre8-slim 2 | 3 | ARG FINDERWEB_VERSION='2.5.4' 4 | 5 | COPY /script/*.sh /docker-script/ 6 | 7 | # 1. 创建用户: tomcat 8 | # 如果已有可忽略 9 | RUN chmod +x /docker-script/* && \ 10 | apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/* && \ 11 | # 1. 创建用户: tomcat 12 | # 如果已有可忽略 13 | useradd tomcat && \ 14 | # 3. 删除并重建ROOT目录, 如有重要资料请注意备份 15 | rm -rf $CATALINA_HOME/webapps/ROOT && \ 16 | mkdir -p $CATALINA_HOME/webapps/ROOT && \ 17 | # 4. 下载并解压到ROOT目录 18 | wget -O /tmp/finder-web-${FINDERWEB_VERSION}.zip http://www.finderweb.net/download/finder-web-${FINDERWEB_VERSION}.war && \ 19 | unzip -o -d ${CATALINA_HOME}/webapps/ROOT /tmp/finder-web-${FINDERWEB_VERSION}.zip && \ 20 | rm -f /tmp/finder-web-${FINDERWEB_VERSION}.zip && \ 21 | # 5. 为应用目录赋权限 22 | chown -R tomcat:tomcat $CATALINA_HOME && \ 23 | chmod -R 755 $CATALINA_HOME && \ 24 | # 处理首次共享目录 25 | mkdir -p /tmp-finderweb-data/ && \ 26 | # 2.5.5 cp -r $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/META-INF/conf/ /tmp-finderweb-data/ 27 | cp -r $CATALINA_HOME/webapps/ROOT/WEB-INF/finderweb/ /tmp-finderweb-data/ 28 | 29 | # 6. 启动Tomcat 30 | # sudo -u tomcat $CATALINA_HOME/bin/startup.sh 31 | 32 | VOLUME [ "${CATALINA_HOME}/webapps/ROOT/WEB-INF/finderweb/" ] 33 | 34 | CMD [ "/docker-script/docker-start.sh", "catalina.sh", "run"] 35 | -------------------------------------------------------------------------------- /.github/workflows/finderweb.yml: -------------------------------------------------------------------------------- 1 | name: finderweb-构建和提交docker 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | paths: 7 | - "!**.md" 8 | - "script/*" 9 | - "*" 10 | - ".github/workflows/*.yml" 11 | 12 | jobs: 13 | 14 | setup-build-publish: 15 | runs-on: ubuntu-latest 16 | name: 构建和推送docker镜像 17 | steps: 18 | 19 | - name: Checkout 20 | # 使用action库 actions/checkout获取源码 21 | uses: actions/checkout@v2.3.2 22 | 23 | 24 | 25 | - name: finderweb-latest 26 | uses: docker/build-push-action@v1.1.0 27 | with: 28 | # Username used to log in to a Docker registry. If not set then no login will occur 29 | username: adockero 30 | # Password or personal access token used to log in to a Docker registry. If not set then no login will occur 31 | password: ${{ secrets.PASSWORD }} 32 | # Docker repository to tag the image with 33 | repository: adockero/finderweb 34 | # Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags 35 | tags: latest,2.5.8 36 | # Path to the Dockerfile (Default is '{path}/Dockerfile') 37 | path: ./ 38 | dockerfile: Dockerfile 39 | # Always attempt to pull a newer version of the image 40 | always_pull: true 41 | # 构建参数 42 | build_args: FINDERWEB_VERSION=2.5.8 43 | # Adds labels with git repository information to the built image 44 | add_git_labels: true 45 | 46 | 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-finderweb 2 | 多项目日志web查看系统,并有tail,less等功能 3 | http://www.finderweb.net/ docker版 4 | 5 | hub.docker.com 6 | https://hub.docker.com/r/adockero/finderweb 7 | 8 | 9 | [![finderweb](http://dockeri.co/image/adockero/finderweb)](https://hub.docker.com/r/adockero/finderweb) 10 | 11 | # 使用 12 | 13 | ## 体验使用 14 | ```bash 15 | docker run -d --name finderweb -p 8080:8080 adockero/finderweb 16 | ``` 17 | 然后访问http://localhost:8080 18 | 19 | 20 | 21 | # 2.5.8版本使用 22 | ## 保留配置文件 23 | ```bash 24 | docker run -d --restart=always --name finderweb \ 25 | -v $(pwd)/conf/:/usr/local/tomcat/webapps/ROOT/WEB-INF/finderweb/ \ 26 | adockero/finderweb 27 | ``` 28 | 29 | 30 | # 2.5.5版本使用 31 | ## 保留配置文件 32 | ```bash 33 | docker run -d --restart=always --name finderweb \ 34 | -v $(pwd)/conf/:/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/META-INF/conf/ \ 35 | adockero/finderweb 36 | ``` 37 | 38 | ## 保留配置文件 + 代码共享 39 | 多个项目看通过软链接集中在一个文件空间中,方便只分配一次权限就能看到所有项目日志 40 | ```bash 41 | docker run -d --restart=always --name finderweb \ 42 | -v /data/www/:/www/ \ 43 | -v $(pwd)/conf/:/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/META-INF/conf/ \ 44 | adockero/finderweb 45 | ``` 46 | 47 | # 构建 48 | ```bash 49 | docker build -t adockero/finderweb . 50 | ``` 51 | 52 | 53 | # 注意 54 | ## 首次安装后最好设置安全key和会话key 55 | 56 | ## 想一次分配多个目录到一个空间中 57 | > 可以通过软链接***ln -s*** ,其中要注意要cd到最终ln目录,然后通过相对路径的方式。其中软链接后首次在左边导航看不到,只要点开软链接目录内部即可在下次刷新中看到。 58 | 59 | ## 首次部署,出现无法进入license,一直提示不存在admin用户 60 | > 那就删除所有共享配置,重新创建容器 61 | 62 | ## 系统集群补充说明 63 | ``` 64 | 1、这个集群就是全master,账号密码会同步登录 65 | 2、一但同步,每台主机都能看到所有机器的日志 66 | 3、而且为了添加主机,必须安全key一致和会话key一致,这样要小心反向同步和被集群化 67 | ``` 68 | 69 | 70 | # 介绍 71 | ## 官网介绍 72 | * (程序员专用) 支持集群部署,允许你同时管理多台机器上的文件或者查看不同机器上的日志; 73 | * (程序员专用) grep支持,类似linux系统的grep命令,支持随时查看文件的任意位置,像播放器一样点击进度条的任意位置; 74 | * (程序员专用) less支持,类似linux系统的less命令,支持随时查看文件的任意位置,像播放器一样点击进度条的任意位置; 75 | * (程序员专用) tail支持,类似linux系统的tail命令; 76 | * (超大文件支持) 支持任意大小的文件,无论多大的文件都秒开,性能与文件大小无关。 77 | * (多操作系统支持),纯Java实现,tail,less,grep均不依赖于具体的操作系统,任何服务器都可使用; 78 | * 支持细粒度的权限控制,能满足不同的权限需求;IT运维或者公司内部资料分享,允许控制文件可见和文件的各种操作。 79 | ![官网介绍图tail](http://www.finderweb.net/resource/demo/2.png) 80 | 81 | ## finderweb和ELK的区别 82 | 这二者没有任何可比性,finderweb是个web文件管理器,就好象windows的资源管理器,只不过它是web的。finderweb的tail,less,grep功能可以理解为windows中的一种文件打开方式,仅此而已。 83 | 而ELK是个庞大的软件,集日志收集,日志传输,日志分析,日志查询等等功能,可以满足更多业务上的数据需求,而且在功能上跟finderweb没有重合的地方;规模上ELK要庞大的多,代码量上finderweb跟ELK不可同日而语;finderweb只是一个小软件、小工具,它针对的是有web操作服务器上文件的需求的用户,看日志仅仅是这个web文件管理器的一个附加功能,而且这个功能还是针对开发人员的,不是针对业务的。 84 | 85 | 86 | 87 | 88 | --------------------------------------------------------------------------------