S'inscrire Se connecter
n/program · il y a 11 mois · Modifié · 501 vues
u/976853694Platine
n/programu/976853694 · il y a 11 mois
Enveloppe rouge

六趣dns2.7 下个版本发布app端支持普通用户,管理员

演示站

https://dns.6qu.cc
账号[email protected]
密码admin123

安装部署指南

环境要求

  • Docker 20.10+
  • Docker Compose 2.0+
  • 域名已托管在 Cloudflare

快速部署

方式一:内置数据库(推荐新手)

  1. 创建项目目录
mkdir dns && cd dns
  1. 创建 docker-compose.yml
version: "3.8"

services:
  # MySQL 数据库
  db:
    image: mysql:8.0
    container_name: dns-mysql
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: root123       # root 密码,请修改
      MYSQL_DATABASE: dns                # 数据库名
      MYSQL_USER: dns                    # 数据库用户
      MYSQL_PASSWORD: dns123             # 数据库密码,请修改
    volumes:
      - mysql_data:/var/lib/mysql
    command: --default-authentication-plugin=mysql_native_password

  # DNS 应用
  app:
    image: 167729539/dns:latest
    container_name: dns-app
    restart: unless-stopped
    depends_on:
      - db
    ports:
      - "5000:5000"
    environment:
      FLASK_ENV: production
      SECRET_KEY: your-secret-key-change-me        # 请修改为随机字符串
      JWT_SECRET_KEY: your-jwt-secret-change-me    # 请修改为随机字符串
      DB_HOST: db
      DB_PORT: "3306"
      DB_NAME: dns
      DB_USER: dns
      DB_PASSWORD: dns123                          # 与上面保持一致

volumes:
  mysql_data:
  1. 启动服务
docker compose up -d
  1. 查看日志
docker compose logs -f app

方式二:外置数据库

适用于已有 MySQL 数据库的情况。

  1. 创建 docker-compose.yml
version: "3.8"

services:
  app:
    image: 167729539/dns:latest
    container_name: dns-app
    restart: unless-stopped
    ports:
      - "5000:5000"
    environment:
      FLASK_ENV: production
      SECRET_KEY: your-secret-key-change-me
      JWT_SECRET_KEY: your-jwt-secret-change-me
      DB_HOST: 192.168.1.100             # MySQL 服务器 IP
      DB_PORT: "3306"
      DB_NAME: dns
      DB_USER: dns
      DB_PASSWORD: your-password
    extra_hosts:
      - "host.docker.internal:host-gateway"

如果 MySQL 在宿主机上,DB_HOST 使用 host.docker.internal

  1. 启动服务
docker compose up -d

访问系统

启动成功后访问:

页面 地址
用户前台 http://服务器IP:5000
管理后台 http://服务器IP:5000/admin

默认管理员账号:

⚠️ 首次登录后请立即修改密码!

更新升级指南

快速更新

一键更新命令:

docker compose pull && docker compose down && docker compose up -d

详细文档

https://976853694.github.io/dns-docs/

7
54
Se connecterpour participer à la discussion.

54 réponses

Ordre
  1. xybug Diamant il y a 11 mois

    刚看了一下只支持Cloudflare渠道

    1
  2. Foxx il y a 11 mois

    都说了是基于CF的哪能不是嘛 :xhj27:

    0
  3. 976853694 Platine Auteur Bonne fête des Bateaux-Dragons, prenez soin de vous il y a 11 mois
    0
  4. NangongWan Argent il y a 11 mois

    先来红包

    1
  5. GeorgeXie 💬 Maître Ne jamais abandonner il y a 11 mois

    感谢分享

    1
  6. trial Diamant Membre Diamant il y a 11 mois

    谢谢分享,看看

    1
  7. Arvin_Leung 🚗 Gloire 3 ANS il y a 11 mois

    越来越完善了。

    支持支持

    0
  8. beteC Platine il y a 11 mois

    先来零个红包

    0
  9. wwo558 Or 2 ANS il y a 11 mois

    看了一下,有时间研究研究

    0
  10. xwpmiao Argent il y a 11 mois

    good app

    0
  11. hynize 2 ANS il y a 11 mois

    我是来拿红包的

    0
  12. m39l Argent 2 ANS il y a 11 mois

    感谢分享

    0
  13. sdcfre Diamant 3 ANS il y a 11 mois

    感谢分享

    0
  14. qub Argent il y a 11 mois

    我以为有app图片呢

    0
  15. zkyqsrt Argent il y a 11 mois

    看一下

    0
  16. 976853694 Platine Auteur Bonne fête des Bateaux-Dragons, prenez soin de vous il y a 11 mois

    你要的图片来啦

    0
  17. qub Argent il y a 11 mois

    谢谢,看到你的app了

    0
  18. Itachi 🤙 Or 2 ANS il y a 11 mois

    支持一下,感谢分享

    0
  19. Dohot 🌭 Or 2 ANS il y a 11 mois

    感谢分享,有机会试试

    0
  20. tyedh 💕 Platine il y a 11 mois

    越来越完善了。支持支持!

    0
  21. hk5rf 🍉 Platine Ne jamais abandonner, ne jamais renoncer il y a 11 mois

    支持支持

    0
  22. lidamianku Or 3 ANS il y a 11 mois

    支持

    0
  23. keale 🎧 Diamant 3 ANS il y a 11 mois

    支持 ,二级域名白菜化,人手一个二级域名分发系统

    0
  24. 976853694 Platine Auteur Bonne fête des Bateaux-Dragons, prenez soin de vous il y a 11 mois

    真能搞起来的没几个

    1
  25. xybug Diamant il y a 11 mois

    刚才看的不仔细,没发现这个渠道呢,之前有powerDNS 的API接口现在也取消了吗?

    0
  26. kinghost Riche à millions Or il y a 11 mois

    抢个红包

    0
  27. ax570383885 Platine Ne jamais abandonner il y a 11 mois

    期待六趣大佬的新版本

    0
  28. Auro 🎧 Or Ne jamais abandonner il y a 11 mois

    支持一下

    0
  29. Undertook Or il y a 11 mois

    支持

    0
  30. xylon Platine Bonne fête des Bateaux-Dragons et bonne santé il y a 11 mois

    在接在历

    0
  31. cs9u Diamant Membre Diamant il y a 11 mois

    xxfx谢谢分享

    0
  32. nikanchik Or il y a 11 mois

    感谢分享

    0
  33. tonylive Or 3 ANS il y a 11 mois

    手上的二级域名可以分发了

    0
  34. creminjess Maître il y a 11 mois

    支持

    0
  35. azhaoyihao Gloire Roi du flood il y a 11 mois

    感谢六趣大佬!

    0
  36. zfzrx Argent il y a 11 mois

    有红包 试试

    0
  37. Wye Argent il y a 11 mois

    有红包呀,我看看

    0