init
This commit is contained in:
commit
922fa0e77a
62 changed files with 2586 additions and 0 deletions
80
README.md
Executable file
80
README.md
Executable file
|
|
@ -0,0 +1,80 @@
|
|||
# Sales Tool プロジェクト
|
||||
|
||||
## 概要
|
||||
|
||||
このリポジトリは、Sales Tool と呼ばれるシステムのバックエンドおよびインフラ構成を管理しています。主に以下のコンポーネントで構成されています。
|
||||
|
||||
- API ゲートウェイ(OpenAPI 定義)
|
||||
- Google Cloud Functions(各種ファンクション)
|
||||
- ワークフロー定義(Cloud Workflow)
|
||||
- Terraform を使ったインフラ構成
|
||||
- テスト用スクリプト・データ
|
||||
|
||||
---
|
||||
|
||||
## フォルダ構成
|
||||
|
||||
```
|
||||
.
|
||||
├── requirements.txt
|
||||
├── api-gateway
|
||||
│ ├── openapi_dev.yaml # 開発環境用 OpenAPI 定義
|
||||
│ └── openapi.yaml # 本番環境用 OpenAPI 定義
|
||||
├── functions # Cloud Functions 実装
|
||||
│ ├── add-company
|
||||
│ │ ├── _scripts
|
||||
│ │ │ └── deploy_dev.sh # デプロイスクリプト(開発環境)
|
||||
│ │ └── source
|
||||
│ │ ├── main.py
|
||||
│ │ └── requirements.txt
|
||||
│ ├── create-meeting-log-to-hubspot
|
||||
│ │ └── source
|
||||
│ │ └── main.py
|
||||
│ ├── create-minutes
|
||||
│ │ └── source
|
||||
│ │ ├── main.py
|
||||
│ │ └── requirements.txt
|
||||
│ └── trigger-minutes-workflow-from-miitel
|
||||
│ └── source
|
||||
│ ├── main.py
|
||||
│ └── requirements.txt
|
||||
├── test # テスト用スクリプトとサンプルデータ
|
||||
│ ├── main.py
|
||||
│ ├── mst_company.csv
|
||||
│ ├── request.json
|
||||
│ ├── requirements.txt
|
||||
│ └── __pycache__
|
||||
│ └── main.cpython-38.pyc
|
||||
├── terraform # インフラ(Terraform)
|
||||
│ └── dev
|
||||
│ ├── main.tf
|
||||
│ ├── terraform.tfstate
|
||||
│ └── terraform.tfstate.backup
|
||||
└── workflows # Cloud Workflow 定義
|
||||
└── workflow-create-minutes
|
||||
└── main.yaml
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ディレクトリ詳細
|
||||
|
||||
- **api-gateway**: OpenAPI 仕様ファイルを管理し、API ゲートウェイで使用。
|
||||
- **functions**: 各種 Google Cloud Functions のソースコードと依存定義。
|
||||
- **test**: ローカルでの動作確認やユニットテストに使用するスクリプト・データ。
|
||||
- **terraform**: Google Cloud 上のリソース(Storage バケットなど)の構築をコード化。
|
||||
- **workflows**: Cloud Workflow の実行定義ファイル(`.yaml`)。
|
||||
|
||||
---
|
||||
|
||||
## ローカル実行方法(概要)
|
||||
|
||||
1. Python の依存インストール: `pip install -r requirements.txt`
|
||||
2. Functions のデプロイ: 各フォルダ内の `deploy_dev.sh` を実行
|
||||
3. Terraform 初期化・適用:
|
||||
```bash
|
||||
cd terraform/dev && terraform init && terraform apply -auto-approve
|
||||
```
|
||||
4. ワークフロー実行: Cloud Console または `gcloud workflows` CLI
|
||||
|
||||
詳細は各ディレクトリの README やコメントを参照してください。
|
||||
Loading…
Add table
Add a link
Reference in a new issue