Sign inSign up

baicailin/tiny_url

By baicailin

Updated almost 4 years ago

白菜林 tinyURL

Image
0

373

baicailin/tiny_url repository overview

使用步骤:

1、新建文件夹 (假设为app )

2、下载配置模版到app/conf/config.yaml 修改配置模版中的配置项为自己的。

debug: true
store:
  dbpath: ./tinyURL.db
  dbtype: bolt
  redis: redis://localhost:6379
server:
  domain: http://127.0.0.1:8080
  port: 8088
  limit: 10
  pprof: true
  name: tinyURL(2D6)
  autotls: false
  autotlsdomain:  2d6.cn
  apiport: 8088
  apidomain: http://127.0.0.1:8088
  icp: xxx
filter:
  domain:
    whitelist:
      - lyhuilin.com
    blacklist:
      - baidu.com
      - taobao.com
      - tmall.com
  keyword:
    whitelist:
      - lyhuilin
    blacklist:
      - gg

3、在app/docker-compose.yml中写入以下内容:

version: "3"
services:
  tiny_url:
    image:  baicailin/tiny_url
    restart: unless-stopped
    # build: ./..
    command: /app/tiny_url_linux -config=/data/conf/config.yaml
    volumes:
      - .:/data
    # environment:
    #   TZ: Asia/Shanghai
    ports:
      - "8088:8088"

4、在app目录下运行命令

docker-compose up -d

5、使用docker run 指令运行(替代上面步骤3-4)

docker run -d -p 8088:8088 --mount type=bind,source=app目录的绝对路径,target=/data,readonly baicailin/tiny_url

6、注意事项 如果需要外网访问,需要修改配置中的地址为公网ip或域名地址(非127.0.0.1)

交流群

@baicai_dev

赞赏

赞赏白菜林,多少不重要,1元也是支持

赞赏白菜林,多少不重要,1元也是支持

Tag summary

Content type

Image

Digest

sha256:4aa744a88

Size

62 MB

Last updated

almost 4 years ago

docker pull baicailin/tiny_url