使用Docker Compose一键启动夜莺,快速尝试。更多Docker Compose相关知识请参考Docker官网 操作演示

    1. $ git clone https://gitlink.org.cn/ccfos/nightingale.git
    2. $ cd nightingale/docker
    3. # docker compose V2版本执行 docker compose up -d (https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command)
    4. $ docker-compose up -d
    5. Creating network "docker_nightingale" with driver "bridge"
    6. Creating mysql ... done
    7. Creating redis ... done
    8. Creating prometheus ... done
    9. Creating ibex ... done
    10. Creating agentd ... done
    11. Creating nwebapi ... done
    12. Creating nserver ... done
    13. Creating telegraf ... done
    14. # docker compose V2版本执行 docker compose ps (https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command)
    15. $ docker-compose ps
    16. Name Command State Ports
    17. ----------------------------------------------------------------------------------------------------------------------------
    18. agentd /app/ibex agentd Up 10090/tcp, 20090/tcp
    19. ibex /app/ibex server Up 0.0.0.0:10090->10090/tcp, 0.0.0.0:20090->20090/tcp
    20. mysql docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp, 33060/tcp
    21. nserver /app/n9e server Up 18000/tcp, 0.0.0.0:19000->19000/tcp
    22. nwebapi /app/n9e webapi Up 0.0.0.0:18000->18000/tcp, 19000/tcp
    23. prometheus /bin/prometheus --config.f ... Up 0.0.0.0:9090->9090/tcp
    24. redis docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
    25. telegraf /entrypoint.sh telegraf Up 0.0.0.0:8092->8092/udp, 0.0.0.0:8094->8094/tcp, 0.0.0.0:8125->8125/udp

    💡启动成功之后,建议把 initsql 目录下的内容挪走,这样下次重启的时候,DB 就不会重新初始化了。否则下次启动 mysql 还是会自动执行 initsql 下面的 sql 文件导致 DB 重新初始化,页面上创建的规则、大盘等都会丢失。Docker Compose 这种部署方式,只是用于简单测试,不推荐在生产环境使用,当然了,如果您是 Docker Compose 专家,另当别论”

    服务启动之后,浏览器访问nwebapi的端口,即18000,默认用户是root,密码是root.2020