后端FlowableFlowable-RestAPI
cmyang官方文档:https://wwv.flowable.com/open-source/docs/bpmn/ch15-REST/
使用docker启动flowable-rest
- 编写docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| version: '3.6' services: flowable-ui-app: image: flowable/flowable-rest environment: - SERVER_PORT=8098 - SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.cj.jdbc.Driver - SPRING_DATASOURCE_URL=jdbc:mysql://10.66.106.86:3306/flowable_learn?characterEncoding=UTF-8 - SPRING_DATASOURCE_USERNAME=root - SPRING_DATASOURCE_PASSWORD=123456 - FLOWABLE.IDM.APP.ADMIN.USER-ID=admin - FLOWABLE.IDM.APP.ADMIN.PASSWORD=123456 - FLOWABLE_COMMON_APP_IDM-ADMIN_USER=admin - FLOWABLE_COMMON_APP_IDM-ADMIN_PASSWORD=123456 ports: - 8098:8098 volumes: - /d/maven/repository/mysql/mysql-connector-java/8.0.27/mysql-connector-java-8.0.27.jar:/app/WEB-INF/lib/mysql-connector-java-8.0.27.jar
|
备注:
(1)修改admin的密码,需要先设置SPRING_DATASOURCE_PASSWORD,单独设置FLOWABLE_COMMON_APP_IDM-ADMIN_PASSWORD是不起作用的
(2)volumes,这里用的是windows的docker,因为flowable本身不带mysql的驱动,所以需要把本地的驱动挂载到容器,前面的**/d**表示在D盘下。windows下也可以写成D:
(3)docker-compose文件名有规定,4种文件,这里就使用docker-compose.yml
- 启动服务
(1)先进入docker-compose.yml所在文件夹的目录
(2)执行命令 docker-compose up -d
- 测试
(1)登录http://localhost:8098/flowable-rest/docs
(2)账号密码:admin/123456