前後端完整的網址導航服務,可以用於公司內部內網使用,提供多種的卡片圖標生成方式,能將上傳的原型壓縮包自動生成可訪問的地址,支持私密卡片,發布倒計時等功能。
用於在公司內網部署使用,可在線修改上傳、可拖拽排序等。
开源项目地址:https://github.com/tuituidan/team-nav
要求Java版本为 1.8.0
个人博客:https://songxwn.com/
RSS订阅:https://songxwn.com/atom.xml
系统:Rocky Linux 8 (关闭SE Linux 关闭防火墙)
dnf install vim wget java-1.8.0-openjdk -y
# 安装JDK 8
cd /opt/
wget https://github.com/tuituidan/team-nav/releases/download/v1.1.2/team-nav.tar.gz
# 下载,也可以手动下载,上传到opt目录下。(https://github.com/tuituidan/team-nav/releases)
tar -zxvf team-nav.tar.gz
# 解压
tree /opt
.
├── team-nav
│ ├── bin
│ │ ├── restart.sh
│ │ ├── start.sh
│ │ ├── status.sh
│ │ └── stop.sh
│ ├── config
│ │ └── application.yml
│ ├── docs
│ ├── logs
│ ├── README.md
│ ├── readme.txt
│ └── team-nav.jar
└── team-nav.tar.gz
# 目录结构如上
chmod +x /opt/team-nav/bin/*
# 给予脚本权限
/opt/team-nav/bin/start.sh
# 启动
/opt/team-nav/bin/status.sh
team-nav 服务正在运行中 (PID: 9527). [is running ...]
# 查看是否运行
/opt/team-nav/bin/stop.sh
# 停止运行
默认端口为8080,通过8080端口访问服务,修改端口可以进入/opt/team-nav/config/application.yml配置。
Docker 安装参考:https://yeasy.gitbook.io/docker_practice/install/centos
mkdir -p /opt/team-nav/logs
mkdir /opt/team-nav/database
mkdir /opt/team-nav/ext-resources
mkdir /opt/team-nav/config
创建日志、数据库、图片、配置文件夹。
docker run -d -p 8080:8080 \
-v /opt/team-nav/logs:/logs \
-v /opt/team-nav/database:/database \
-v /opt/team-nav/ext-resources:/ext-resources \
-v /opt/team-nav/config:/config \
-e nav-name="团队内部导航服务" \
--restart always \
--name team-nav \
registry.cn-chengdu.aliyuncs.com/tuituidan/team-nav:1.1.2
映射容器8080端口到宿主机8080端口,通过访问主机 http://127.0.0.1:8080 。
映射上述步骤创建的文件夹
配置网站名字
配置为自动启动
配置容器名字
路径:http://127.0.0.1:8080/login
默认账号:admin
默认密码:123456
vim /opt/team-nav/config/application.yml
# 是否开启页面上进行密码修改,用户只有一个,请谨慎开启
change-password:
enable: true
/opt/team-nav/bin/status.sh
# ZIP包部署执行重启脚本
docker restart team-nav
# docker部署重启容器生效
vim /etc/nginx/conf.d/team.conf
server {
listen 80;
listen [::]:80;
server_name team.baidu.com;
# reverse proxy
location / {
proxy_pass http://127.0.0.1:8082/;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /ext-resources/modules {
alias /opt/team-nav/ext-resources/modules;
index index.html index.htm;
}
}
一般来说只修改域名即可