baratsemet/ohurlshortener-portal

By baratsemet

Updated almost 2 years ago

ohUrlShortener 短链接系统门户

Image

1.5K

baratsemet/ohurlshortener-portal repository overview

ohUrlShortener (Portal)

适合中小型社区网站使用的短链接服务系统,支持短链接成产、查询及302转向,并顺带简单的点击量统计

  1. 支持 Docker One Step Start 部署、Makefile 编译打包
  2. 支持短链接生产、查询、存储、302转向
  3. 支持访问日志查询、访问量统计、独立IP数统计
  4. 支持 HTTP API 方式新建短链接、禁用/启用短链接、查看短链接统计信息、新建管理员、修改管理员密码

screenshot

源代码获取

Gitee: https://gitee.com/barat/ohurlshortener
Github: https://github.com/barats/ohUrlShortener
Gitlink: https://www.gitlink.org.cn/baladiwei/ohurlshortener

如何使用本镜像

$ docker run --name {some_container_name}  -v {path_to_config_file}:/app/config.ini  -p {local_port}:9091  -d baratsemet/ohurlshortener-portal:latest

必要的参数说明

-v {path_to_config_file}:/app/config.ini

镜像启动时,会读取 app/config.ini 文件,并试图从中获取必要的系统配置参数,其内容请参照:

[app]
debug = false
port = 9091
admin_port = 9092
url_prefix = http://localhost:9091/

[redis]
host = 127.0.0.1:6379
database= 0
username=
password=
pool_size = 50

[postgres]
host = localhost
port = 5432
user = postgres
password = postgres
database = oh_url_shortener
max_open_conn = 20
max_idle_conn = 5

-p {local_port}:9091

镜像启动时,会开启容器 9091 端口服务,请映射必要的本地端口

数据库脚本

启动 PostgreSQL 数据库并新建名称 oh_url_shortener 的数据库,其需要的表、视图等请参考如下脚本

Gitee: https://gitee.com/barat/ohurlshortener/blob/main/structure.sql
Github: https://github.com/barats/ohUrlShortener/blob/main/structure.sql
Gitlink: https://www.gitlink.org.cn/baladiwei/ohurlshortener/tree/main/structure.sql

Docker Pull Command

docker pull baratsemet/ohurlshortener-portal