github: https://github.com/YOURLS/YOURLS
1、docker-compose 文件
yourls.yml
version: '3.1'
services:
yourls:
image: yourls
restart: always
ports:
- 80:80
environment:
YOURLS_DB_PASS: 123456789
YOURLS_SITE: http://test.com
YOURLS_USER: test
YOURLS_PASS: test
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456789
2、启动:
docker-compose -f yourls.yml up -d
3、本地测试:修改hosts文件:
192.168.1.1 test.com
192.168.1.1 www.test.com
4、安装:
http://test.com/admin/install.php
image.png5、管理页面:
http://test.com/admin/index.php
image.png6、插件:
默认递增id,可以开启插件来随机网址
image.png7、添加:
输入需要缩短的网址:
image.png生成短网址:
image.png
网友评论