This repository is a simple example of how to use Golang, Docker, Terraform and actions on google.
- Installed Terraform
- Installed Actions on google command line interface
- Created Google cloud project
- Created Actions on google project
The app consists of a service in golang, an infrastructure provided by terraform and actions on google configuration files.
Set the service domain in chat-service/service/Config.go
. The HTTPS is provided by cert magic library.
The terraform configuration file is designed to work with google cloud. Follow this tutorial to get the JSON file with credentials and
copy it to terraform/config/google_cloud_credentials.json
Check out terraform/config/outputs.tf
to set the domain and your google cloud project id.
There are two helpful scripts available:
/scripts/depoly.sh
- creates infrastructure on Google Cloud
/scripts/update.sh
- builds the service, uploads binaries to virtual machine and spins up a Docker instance
The last step is to configure actions on google. The google-actions/
contains configuration files for every supported language.
You need change the service domain.
To apply the changes gactions update --action_package action.en.json --action_package action.pl.json --project {googleActionsProjectId}