-
修改
src/resources/simbot-bots/bot.json
-
修改
src/resources/application.yml
中spring.profiles.active
为prod
spring: profiles: active: prod
-
本地打包得到jar文件
-
服务器上制作docker镜像
Dockerfile
FROM openjdk:17-oracle ADD qq-robot-1.0-SNAPSHOT.jar /app.jar RUN bash -c 'touch /app.jar' WORKDIR /app ENTRYPOINT 9543 ENTRYPOINT ["java", "-Dfile.encoding=utf-8", "-Djava.security.edg=file:/dev/./urandom", "-Duser.timezone=Asia/Shanghai", "-Xmx128m", "-Xms64m", "-jar", "/app.jar"]
将jar和Dockerfile放在同一个目录下执行一下语句
docker build . --file Dockerfile --tag twwch/qq-chat-gpt:master
因为需要和终端做交互(输入验证码),因此前台启动
docker run -it -m 1800m --restart=always --net=host --name qq-robot-chatgpt \ -v /etc/hosts:/etc/hosts \ -v /etc/localtime:/etc/localtime \ twwch/qq-chat-gpt:master
启动完成后会出现一个链接,点击去验证获取授权码,拿到ticket后,输入即可,所有授权完成后,退出程序,然后重启程序即可
docker restart qq-robot-chatgpt
-
Notifications
You must be signed in to change notification settings - Fork 0
twwch/qq-chat-gpt
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published