Skip to content

ウサギのように速く、ハチの様に鋭く刺さるフレームワーク

Notifications You must be signed in to change notification settings

aikizoku/rabbitgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

これはなに?

Go GCP Project Template

開発環境構築

Go

インストール

brew install go

バージョン確認

go version

ghq

インストール

brew install ghq

ディレクトリの設定

git config --global ghq.root ~/workspace/src

プロジェクト取得

ghq get git@github.com: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

http://localhost:8080/ping

デプロイ

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

VScode で Functions 内のコードがエラー表示になる

https://qiita.com/chanhama/items/a21ca7d5cd43d6f3f90d

About

ウサギのように速く、ハチの様に鋭く刺さるフレームワーク

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published