Notes
tl;dr: Follow documentation for hosting a static website doc
- Previously created a Cloud Storage bucket.
- Set the Cloud Storage bucket acls for allUsers to “Storage Object Viewer”.
- Set the auth
gcloud auth application-default login
. - Ran
hugo deploy
and verified that they appeared in the Cloud Storage bucket. - Enabled the Compute Engine API.
- Created a Global HTTPS load balancer and set that to the Cloud Storage bucket.
- This is where I ran into some problems with the deployment. It kept loading
the index.xml file rather than the index.html file. Things I tried:
- Update the load balancer routes to reroute to index.html.
- Ran
python3 -m http.server
on thepublic/
directory - Deleted the
public/
directory. Note: Turns out that you should not do that. If you ever run into that problem, runhugo --cleanDestinationDir
to regenerate thepublic/
directory. - Fix: There is a Cloud Storage bucket overflow menu to
“Edit the Website Configuration”. Setting the index to
index.html
and the 404 page to the404.html
page fixed the problem.
- Updated the
config.toml
file withbaseURL = "https://cnishina.dev/"
- Updated my domain with an A record
- Running the
hugo deploy
and an empty cache refresh fixed the problem.
Task Completed
- Deploy Hugo site with Google Cloud Storage (See: https://gohugo.io/hosting-and-deployment/hugo-deploy/)
Future work
- Use pyaudio interactions with python chatbot
- Text to speech for python chatbot
- Try out Dialogflow again (TypeScript version? and/or Python version)
- Saving stuff into Firestore (revive this)
- Revive Discord bot