Google App Engine With HugoGCP
Last time, i setup a docker image for this website, served with a reverse proxy Traefik. It's nice, it works on a low price OVH server.
This time, i want to test Google App Engine with the static website. The setup is done, it works fine.
Here some explanations.
- create directory for the app, with www simlinked to public of hugo.
ln -s /home/nicolas/.../hugo-blog/public www
Here is my app.yaml working.
- url: /robots.txt
# file with extensions (longer cache period)
- url: /(.*\.(css|js|woff|woff2|ico|png|jpg))
# file with extensions
- url: /(.*\..*)
# assume file without extensions use index.html
- url: /(.*)/
- url: /
gcloud app deploy
Here is an update, I've been trying for a month, it work fine for me, it cost me nothing as I almost dont have visit on the website.
I having a good response time and a easy workflow to keep up.
Update 2021 : I'm not using this method anymore, I'm using Firebase hosting. I dont remember the exact reason why, meaby it's faster to send to production. The approch of using a python runtime could also look weird for static html content, and the rewriting part not so lovely.