支持docker

pull/3/head
tanghc 4 years ago
parent 418c9ffc7a
commit dc8d28a256
  1. 6
      doc/docs/files/10010_快速体验.md
  2. 2
      docker-entrypoint.sh
  3. 12
      dockerfile

@ -22,13 +22,13 @@
- 安装并启动Nacos,[安装教程](https://nacos.io/zh-cn/docs/quick-start.html) - 安装并启动Nacos,[安装教程](https://nacos.io/zh-cn/docs/quick-start.html)
- 执行Mysql脚本`sop.sql`(Mysql版本5.6+),5.6以下运行`sop-mysql5.6以下版本.sql` - 执行Mysql脚本`sop.sql`(Mysql版本5.6+),5.6以下运行`sop-mysql5.6以下版本.sql`
- 打开`docker-entrypoint.sh`,修改mysql,nacos地址 - 打开`docker-entrypoint.sh`,修改mysql,nacos配置
- 执行`docker-build.sh` - 执行`docker-build.sh`
- 找到sop-test,运行`com.gitee.sop.test.AlipayClientPostTest.testGet`进行接口调用测试 - 找到sop-test,运行`com.gitee.sop.test.AlipayClientPostTest.testGet`进行接口调用测试
> admin地址:http://ip:8082/ > - admin地址:http://ip:8082 登录账号:admin/123456
> 文档地址:http://ip:8083/ > - 文档地址:http://ip:8083/
## 使用admin ## 使用admin

@ -3,7 +3,7 @@
JAVA_OPTS="-Xms128m -Xmx128m" JAVA_OPTS="-Xms128m -Xmx128m"
# mysql, nacos配置 # mysql, nacos配置
args="--mysql.host=10.1.30.110:3306 --register.url=10.1.30.110:8848" args="--mysql.host=10.1.30.110:3306 --mysql.username=root --mysql.password=root --register.url=10.1.30.110:8848"
java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-gateway/sop-gateway.jar $args --logging.file.path=/sop/sop-gateway/log & java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-gateway/sop-gateway.jar $args --logging.file.path=/sop/sop-gateway/log &
java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-admin/sop-admin.jar $args --logging.file.path=/sop/sop-admin/log & java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-admin/sop-admin.jar $args --logging.file.path=/sop/sop-admin/log &

@ -2,18 +2,6 @@ FROM java:8
VOLUME /tmp VOLUME /tmp
VOLUME /sop VOLUME /sop
COPY sop.sql sop.sql
# 安装mysql
RUN yum install mysql mysql-server
RUN /etc/init.d/mysqld start &&\
mysql -e "grant all privileges on *.* to 'root'@'%' identified by 'root';" &&\
mysql -e "grant all privileges on *.* to 'root'@'localhost' identified by 'root';"
EXPOSE 3306
CMD ["mysqld_safe"]
CMD mysql -uroot -proot mysql < sop.sql
# 将所有应用放到一个镜像当中 # 将所有应用放到一个镜像当中
ADD sop-gateway/target/*.jar sop/sop-gateway/sop-gateway.jar ADD sop-gateway/target/*.jar sop/sop-gateway/sop-gateway.jar
ADD sop-admin/sop-admin-server/target/*.jar sop/sop-admin/sop-admin.jar ADD sop-admin/sop-admin-server/target/*.jar sop/sop-admin/sop-admin.jar

Loading…
Cancel
Save