Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加makefile,docker-compose自动build MySQL等 #14

Merged
merged 9 commits into from
Feb 22, 2023

Conversation

yijia2413
Copy link
Contributor

  • 添加makefile
  • mysql可在docker compose自动配置
  • 提供init.sql模板
  • 在arm64、amd64、win64上测试成功

Makefile Outdated
dockerenv:
docker build -t ${BINARY_NAME}:${VERSION} -f $(shell pwd)/docker/callback.Dockerfile .

mac:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mac 上应该有 amd64 和 arm64 两个版本

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done by 51336ba

README.md Outdated
```sql
CREATE DATABASE chatgpt DEFAULT CHARACTER SET utf8mb4
```
- 如果使用的是 MySQL,则需要自行创建数据库,建库 SQL 可以参考下面的命令:[init.sql](/init.sql)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MySQL 只需要建库 SQL 即可,程序启动后便可以自动生成数据库表。保留 init.sql 可以的,也可以不使用初始化脚本。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除了建表语句,docker compose 版本会自动建库,手动创建可参考init.sql即可

@@ -6,18 +6,18 @@ version = "0.1.1"
port = 8000

[logger]
level = "debug"
level = "info"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得可以默认 debug,用户试用阶段有一些日志也好排查问题。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修正

@fanchunke
Copy link
Owner

@yijia2413 感谢提的 PR,麻烦合并一下新版本后再 Merge。

@yijia2413
Copy link
Contributor Author

@fanchunke 麻烦 review

@fanchunke fanchunke merged commit 4fce66e into fanchunke:master Feb 22, 2023
fanchunke added a commit that referenced this pull request Jun 19, 2023
添加makefile,docker-compose自动build MySQL等
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants