-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from act-kithub/develop
add CD
- Loading branch information
Showing
5 changed files
with
206 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,82 @@ | ||
# ukwhatn's application template | ||
# KITHUBSys | ||
|
||
## これは何? | ||
|
||
Discordサーバ管理用Botシステム | ||
|
||
## 開発 | ||
|
||
### 開発環境 | ||
|
||
- **python** | ||
- 3.10以降 | ||
- 動作には必要ないが、開発時にあったほうがサジェストとか出るので良い | ||
- **Docker** | ||
- Docker Composeを利用 | ||
|
||
### 環境構築 | ||
|
||
```shell | ||
1. リポジトリをcloneする | ||
|
||
git clone [email protected]:act-kithub/KITHUBSys.git | ||
|
||
2. プロジェクトディレクトリに移動する | ||
|
||
cd KITHUBSys | ||
|
||
3. poetryをインストールする | ||
|
||
pip install poetry | ||
|
||
4. poetryで依存関係をインストールする | ||
|
||
make poetry:dev:setup | ||
|
||
5. poetry環境に入る | ||
|
||
make poetry:shell | ||
|
||
6. envファイルをコピーする | ||
|
||
make envs:init | ||
|
||
7. discord.envにDiscordのBotトークンを設定する | ||
|
||
nano envs/discord.env | ||
|
||
8. 立ち上げる | ||
|
||
make up | ||
``` | ||
|
||
> [!NOTE] | ||
> ソースの編集は`discord`ディレクトリをルートとしてVSCodeやIDEで開いたほうが楽です | ||
> (ローカルパッケージの名前解決ができません) | ||
> | ||
> また、discordディレクトリ内にある `pyproject.toml`や `poetry.lock`、 `db`ディレクトリは | ||
> すべてプロジェクトルートにある同名ファイル・ディレクトリのシンボリックリンクです | ||
|
||
### 開発に必要そうなコマンド | ||
|
||
```shell | ||
> docker composeコマンドを直接叩くときは、 | ||
> docker compose -f compose.dev.yml ~~ で | ||
> compose.dev.ymlを指定する | ||
|
||
- dockerコンテナを立ち上げ直す | ||
make reload | ||
|
||
- Pythonパッケージを追加 | ||
make poetry:add group=discord packages="xxx yyy zzz" | ||
※ dbの依存関係に入れたい場合は group=db | ||
|
||
- DBのマイグレーションファイルを生成 | ||
make db:revision:create NAME="add_column_to_table" | ||
※ db/packages/models.py の編集後に実施 | ||
|
||
- DBのマイグレーションを実行 | ||
make db:migrate | ||
``` | ||
|
Oops, something went wrong.