cubefs / cubefs-dashboard

a web-admin for cubefs
Apache License 2.0
20 stars 17 forks source link

feat: add docker file #12

Closed setcy closed 1 year ago

setcy commented 1 year ago

Usage

Add config.yml to the host:

server:
  port: 6007  //服务监听端口
  mode: dev   //运行模式 test dev prod
  static_resource:
    enable: true  //是否开启静态资源
    relative_path: /portal  //静态资源前缀
    root_path: ./dist  //静态资源目录  默认在运行的目录下
prefix:
  api: /api/cubefs //后端接口前缀
mysql:
  host: xxxxxx   //mysql 读写域名
  port: xxxxxx   //mysql 读写域名的端口
  slaveHost: xxxxxx   //mysql 只读域名,没有的话可以填读写域名
  slavePort: xxxxxx   //mysql 只读域名的端口,没有的话可以填读写域名的端口
  user: xxxxxx   //mysql  用户名
  password: xxxxxx   //mysql  密码(此处不能是明文密码,需要先加密)
  database: xxxxxx   //mysql  数据库名
  maxIdleConn: 20
  MaxOpenConn: 300

Encrypt password:

$ docker run cubefs-dashboard:latest /app/cfs-gui -e 123456
shH2bjoxp8hWG3cisjKf6g==

Run docker:

$ docker run -d \
  --name=cubefs-dashboard \
  -p 6007:6007 \
  -v /path/to/config.yml:/app/config.yml \
  cubefs-dashboard:latest