Sign inSign up

litongjava/ibot9_20171020

By litongjava

•Updated over 8 years ago

小I机器人的ibot9版本,包含3个服务,4个部分,笔者组合到了一个容器中

Image
1

10K+

litongjava/ibot9_20171020 repository overview

在外部服务器添加nginx指向 upstream studyibot9{ server 192.168.28.214:1032; } server { listen 80; server_name study.ibot.uairobot.com;

location /{
    proxy_pass http://studyibot9;
    proxy_pass_header Set-Cookie;
    proxy_set_header Host  $host:$server_port;
}

}

启动容器 docker run -dit --restart always --name ibot9_test -p 1032:8000 litongjava/ibot9_20171020 /bin/sh docker-enter ibot9_test

如果映射到外网需要修改 webapps/robot/WEB-INF/classes/app.properties robot.context_path=http://study.ibot.uairobot.com/robot/⁠ webapps/manager/WEB-INF/classes/app.properties robot.context_path=http://study.ibot.uairobot.com/robot/⁠ robot.context_path.internal=http://127.0.0.1:8000/robot/⁠

启动 ibot9容器中的服务 /usr/local/ibot/ai-engine8/knity.sh start /etc/init.d/mysqld start sleep 10s /usr/local/ibot/jetty6/jetty.sh start 注意,需要ai-engine系统后才可以启动ibot就是执行 /usr/local/ibot/jetty6/jetty.sh start

ibot9创建过程 #!/bin/sh #file_name:docker_ibot_install.sh

#安装mysql yum -y install mysql mysql-server

#修改数据库配置文件 vi /etc/my.cnf 修改如下 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql character-set-server=utf8 lower_case_table_names=1 #不区分大小写 default-storage-engine=INNODB #使用innoDB引擎 skip-name-resolve #跳过名称解析 symbolic-links=0

[mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid

#启动数据库 /etc/init.d/mysql start

#执行下面的sql语句,创建用户名和密码 create user ibot9 identified by 'ibot9'; create database ibot9; grant all privileges on ibot9.* to ibot9@'localhost' identified by 'ibot9'; grant all privileges on ibot9.* to ibot9@'127.0.0.1' identified by 'ibot9'; grant all privileges on ibot9.* to ibot9@'%' identified by 'ibot9'; flush privileges;

#初始化数据库 wget http://111.202.106.148:1028/public/ibot/app/ibot9.tar.gz⁠ tar -zxf ibot9.tar.gz -C /usr/local/ cd /usr/local/ibot/dbtool

vi classes/app.properties

jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306/ibot9?useUnicode=true&characterEncoding=UTF-8 jdbc.username=ibot9 jdbc.password=ibot9 jdbc.validationQuery=select 1

./run.sh 1.校验数据库(表,视图,字段,索引,初始数据)/1. iBot Enterprise

#启动引擎 cd ../ai-engine8/ ./knity.sh start

#启动ibot cd ../jetty6 vi jetty.sh #jvm中包含下面的参数 #-Dh2db.port=9100 -DObjectContext.enabled=true

vi webapps/robot/WEB-INF/classes/app.properties vi webapps/manager/WEB-INF/classes/app.properties #修改mysql 连接如下 #mysql jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306/ibot9?useUnicode=true&characterEncoding=UTF-8 jdbc.username=ibot9 jdbc.password=ibot9 jdbc.validationQuery=select 1 hibernate.dialect=org.hibernate.dialect.MySQLDialect

Tag summary

Content type

Image

Digest

Size

2 GB

Last updated

over 8 years ago

docker pull litongjava/ibot9_20171020