DOClever开源地址:http://doclever.cn/controller/download/download.html docker安装方法: http://www.onezos.com/topic/26/centos%E4%B8%ADdocker%E5%AE%89%E8%A3%85%E6%96%B9%E6%B3%95 服务器:腾讯云

[[email protected] /]# docker --version
Docker version 20.10.5, build 55c4c88
[[email protected] /]# docker-compose --version
docker-compose version 1.28.5, build c4eb3a1f
[[email protected] /]# cd /home
[[email protected] home]# mkdir doclever
[[email protected] home]# cd doclever/
[[email protected] doclever]# vi docker-compose.yml
version: "2"
services:
  DOClever:
    image: lw96/doclever
    restart: always
    container_name: "DOClever"
    ports:
    - 10040:10000
    volumes:
    - /src/doclever/file:/root/DOClever/data/file
    - /src/doclever/img:/root/DOClever/data/img
    - /src/doclever/tmp:/root/DOClever/data/tmp
    environment:
    - DB_HOST=mongodb://mongo:27017/DOClever
    - PORT=10000
    links:
    - mongo:mongo

  mongo:
    image: mongo:latest
    restart: always
    container_name: "mongodb"
    volumes:
    - /src/doclever/db:/data/db

启动服务:

[[email protected] doclever]# docker-compose up -d
...
Digest: sha256:546dd0fe158bb16f7a1ddd258783642def4254c3ebe00e974fb25e845d73398b
Status: Downloaded newer image for lw96/doclever:latest
Creating mongodb ... done
Creating DOClever ... done

使用docker ps 查看启动的doclever进程

[[email protected] doclever]# docker ps | grep doclever
697628e16761   lw96/doclever   "/entrypoint.sh"         2 minutes ago   Up 2 minutes   0.0.0.0:10040->10000/tcp   DOClever

如果有防火墙: firewall-cmd --status查看防火墙是否开启 firewall-cmd --list-all查看开放了哪些端口 firewall-cmd --zone=public --add-port=10040/tcp --permanent添加放行端口 firewall-cmd -reload重载防火墙 firewall-cmd --list-all查看是否成功

Copyright © OneZos all right reserved,powered by Gitbook本书发布时间: 2021-06-09 09:57:39

results matching ""

    No results matching ""