Skip to content

Commit

Permalink
feat: add installation support for other workspaces (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonNekoGH authored May 5, 2023
1 parent a8b41dd commit b0fcf6b
Show file tree
Hide file tree
Showing 26 changed files with 2,796 additions and 40 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ docker buildx build --platform linux/arm64,linux/amd64 -t <tag> -f Dockerfile .
| `OPENAI_API_SECRET` | `true` | | OpenAI API Secret Key that looks like `sk-************************************************`, you can obtain one by signing in to OpenAI platform and create one at [http://platform.openai.com/account/api-keys](http://platform.openai.com/account/api-keys). |
| `DB_CONNECTION_STR` | `true` | | PostgreSQL database URL. Such as `postgres://postgres:postgres@localhost:5432/postgres`. You could also suffix with `?search_path=<schema name>` if you want to specify a schema |
| `OPENAI_API_HOST` | `false` | `https://api.openai.com` | OpenAI API Host, you can specify one if you have a relay or reversed proxy configured. Such as `https://openai.example.workers.dev` |
| `SLACK_CLIENT_ID` | `false` | | Slack app client id, you can create a slack app and get it, see: [tutorial](https://api.slack.com/tutorials/slack-apps-and-postman) |
| `SLACK_CLIENT_SECRET` | `false` | | Slack app client secret, you can create a slack app and get it, see: [tutorial](https://api.slack.com/tutorials/slack-apps-and-postman) |
| `SLACK_WEBHOOK_PORT` | `false` | `7070` | Port for webhook server |
| ~~`CLOVER_DB_PATH`~~ | ~~`false`~~ | ~~`insights_bot_clover_data.db`~~ | **Deprecated**. ~~Path to Clover database file, you can specify one if you want to specify a path to store data when executed and ran with binary. The default path is `/var/lib/insights-bot/insights_bot_clover_data.db` in Docker volume, you can override the defaults `-e CLOVER_DB_PATH=<path>` when executing `docker run` command or modify and prepend a new `CLOVER_DB_PATH` the `docker-compose.yml` file.~~ |

## Acknowledgements
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ services:
- TELEGRAM_BOT_TOKEN=<Telegram Bot API Token>
- OPENAI_API_SECRET=<OpenAI API Secret Key>
- DB_CONNECTION_STR=<PostgresSQL database URL>
# - SLACK_BOT_TOKEN=<Slack Bot User OAuth Token> # optional, uncomment this if you want to enable slack integration
# - SLACK_CLIENT_ID=<Slack App Client ID> # optional, uncomment this if you want to enable slack integration
# - SLACK_CLIENT_SECRET=<Slack App Client Secret> # optional, uncomment this if you want to enable slack integration
# - OPENAI_API_HOST=https://<Some Host> # uncomment this if you want to use your own OpenAI API host
ports:
- 7070:7070
Expand All @@ -22,7 +23,8 @@ services:
- TELEGRAM_BOT_TOKEN=<Telegram Bot API Token>
- OPENAI_API_SECRET=<OpenAI API Secret Key>
- DB_CONNECTION_STR=postgresql://postgres:123456@db_local:5432/postgres?search_path=public&sslmode=disable
# - SLACK_BOT_TOKEN=<Slack Bot User OAuth Token> # optional, uncomment this if you want to enable slack integration
# - SLACK_CLIENT_ID=<Slack App Client ID> # optional, uncomment this if you want to enable slack integration
# - SLACK_CLIENT_SECRET=<Slack App Client Secret> # optional, uncomment this if you want to enable slack integration
# - OPENAI_API_HOST=https://<Some Host> # uncomment this if you want to use your own OpenAI API host
ports:
- 7070:7070
Expand Down
132 changes: 130 additions & 2 deletions ent/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ent/ent.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions ent/hook/hook.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ent/internal/schemaconfig.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b0fcf6b

Please sign in to comment.