module
0.0.0-20240403015113-5fbca51e8501
Repository: https://github.com/aikizoku/rabbitgo.git
Documentation: pkg.go.dev
# README
これはなに?
Go GCP Project Template
開発環境構築
Go
インストール
brew install go
バージョン確認
go version
ghq
インストール
brew install ghq
ディレクトリの設定
git config --global ghq.root ~/workspace/src
プロジェクト取得
ghq get [email protected]:aikizoku/rabbitgo.git
yq
インストール
brew install yq
Google Cloud SDK
インストール
curl https://sdk.cloud.google.com | bash
exec -l $SHELL
初期化
gcloud init
新しいアカウントでログイン
gcloud auth login
Rundoc
インストール
cd ~/
GO111MODULE=off go get github.com/aikizoku/rundoc
Air
https://github.com/cosmtrek/air
Terraform
インストール
brew install terraform
動かす
起動
cd appengine/default
air
デプロイ
Cloud Build
develop branch に push で staging master branch に push で production
手動
AppEngine
cd appengine/default
gcloud app deploy app_staging.yaml --project xxxxxxx
gcloud app deploy app_production.yaml --project xxxxxxx
Functions
cd functions/sample-handler
make deploy # ステージング環境
make deploy-prod # 本番環境
インフラ設定
Terraform
cd terraform/staging
terraform plan
terraform apply
cd terraform/production
terraform plan
terraform apply
Firestore の index をステージングから本番に同期
cd command/firestore_index
make get
make deploy-prod
エラーに関するFAQ
起動時に google: could not find default credentials.
が発生した
gcloud auth application-default login