88250 / solo

🎸 B3log 分布式社区的 Java 博客端节点系统,欢迎加入下一代社区网络。B3log distributed community blog-end node based on Java, welcome to join the next generation community network.
https://b3log.org/solo
Other
1.56k stars 440 forks source link

compose 启动solo时[org.b3log.solo.Server:174]: Latke init failed, please configure latke.props or run with args, visit https://ld246.com/article/1492881378588 for more details #244

Closed wenming5112 closed 2 years ago

wenming5112 commented 2 years ago

描述问题 Describe the problem

[org.b3log.solo.Server:174]: Latke init failed, please configure latke.props or run with args, visit https://ld246.com/article/1492881378588 for more details 使用compose配置文件七洞容器时保存,solo无法启动。而使用docker命令行启动时可以的。

期待的结果 Expected result

期待compose也能正确启动容器,希望官方提供相应的compose文件

截屏或录像 Screenshot or video

我的配置compose文件:

version: "3"

services:
  b3log:
    image: b3log/solo
    container_name: b3log
    restart: always
    #network_mode: host
    privileged: true
    environment:
    - RUNTIME_DB="MYSQL"
    - JDBC_USERNAME="root"
    - JDBC_PASSWORD="123456" 
    - JDBC_DRIVER="com.mysql.cj.jdbc.Driver"
    - JDBC_URL="jdbc:mysql://10.72.11.1:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true"
    command:  --listen_port=8080 --server_scheme=http --server_host=localhost --server_port= --lute_http=http://10.72.11.1:8249
    volumes:
    # Pay attention to synchronization time
    # echo 'Asia/Shanghai' > /etc/timezone/timezone
    - /etc/timezone/timezone:/etc/timezone
    - /etc/localtime:/etc/localtime
    - ./solo/conf/latke.properties:/opt/solo/latke.properties:ro
    - ./solo/skins/:/opt/solo/skins/:ro
    ports:
    - 8080:8080
    networks:
    - blog-extranet
    dns:
    - 114.114.114.114
    - 8.8.8.8
  blog-nginx:
    image: nginx:1.14
    restart: always
    container_name: blog-nginx
    privileged: true
    ports:
      - 80:80
      - 443:443
    links:
      - b3log
    depends_on:
      - b3log
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./nginx/conf/:/etc/nginx/conf.d/
      - ./nginx/cert/:/etc/nginx/cert/
      - ./nginx/logs/:/etc/nginx/log/
    dns:
    - 114.114.114.114
    - 8.8.8.8
networks:
  blog-extranet:
    driver: bridge

不知可否提供能正确启动的compose文件

docker指令:

docker run --detach --name solo --publish 8080:8080 \
--env RUNTIME_DB="MYSQL"    \
--env JDBC_USERNAME="root"  \
--env JDBC_PASSWORD="123456"  \
--env JDBC_DRIVER="com.mysql.cj.jdbc.Driver"   \
--env JDBC_URL="jdbc:mysql://10.72.11.1:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true"  b3log/solo \
--listen_port=8080 \
--server_scheme=http \
--server_host=localhost \
--server_port= 

版本环境 Version environment

其他信息 Other information

88250 commented 2 years ago

参考一下这里试试 https://ld246.com/article/1650165969854

wenming5112 commented 2 years ago

这个问题已经解决了,你发的这个链接就是我推的文章

88250 commented 2 years ago

哦哦,好的 :)