Issue deploying Go app to Google App Engine standard environment

Description

I’m in the process of configuring my Go app to be able to be automatically deployed to GAE in the standard environment on pushes to master on GitHub.

So far, I’ve been able to set it up using Google App Engine’s flexible environment but I’m unable to take advantage of the Free Tier by doing so. I’m pretty sure what I’m doing wrong is misconfiguring my cloudbuild.yml file since it seems like the code is actually getting to GAE but it will not run when it gets there.

Here’s my app.yaml:

runtime: go112

Here’s my cloudbuild.yaml (although this is changing as I’m basically just iterating over a bunch of different configurations to get something to work):

steps:
  - name: 'gcr.io/cloud-builders/go'
    args: ['install', '.']
    env: ['PROJECT_ROOT=watchmyrepo']
  - name: 'gcr.io/cloud-builders/go'
    args: ['build', 'watchmyrepo']
    env: ['PROJECT_ROOT=watchmyrepo']
  - name: 'gcr.io/cloud-builders/go'
    args: ['run', 'watchmyrepo']
    env: ['PROJECT_ROOT=watchmyrepo']
  artifacts:
    objects:
      location: 'gs://watchmyrepo-248001/'
      paths: ['watchmyrepo']

The Go app itself is relatively standard in its layout/design and can be found here where I’m working on the “gae-standard” branch.

I’d ideally love to have:

  • TravisCI run tests/deploy code to GAE
  • GAE running the code in the standard environment

Right now, the TravisCI output seems like it’s deploying successfully, based on the logs (see below) and I see the project getting updated in the GCP console but there are no running instances - I feel like I’m missing something super simple but can’t quite figure out what it is.

The documentation on the TravisCI side is pretty clear and make sense - following that was no problem - but I’m stuck trying to figure out what else should be in the repo in order to make it successfully deploy on GAE.

If anyone has a good example to point me at, or some insight into what I’m doing wrong, I’d appreciate it.

I think the watchmyrepo.db file was exactly the problem or at least that’s what it looks like in the logs (which I failed to find/review). I’m planning on migrating this over two Datastore or something else and moving off of BoltDB so that should alleviate the issue.

It was all just coding issues on my part that were generating 500/502 errors and those have now all been resolved - thanks!

Imprint