nytimes / library

A collaborative documentation site, powered by Google Docs.
https://nyt-library-demo.herokuapp.com/
Apache License 2.0
1.14k stars 143 forks source link

Question: Where is app.yaml located? #373

Open pvizan-artefact opened 5 months ago

pvizan-artefact commented 5 months ago

I wish to deploy library to Google App Engine. There is an app.yaml file required and the documentation states that "You can also deploy Library to GAE, using the included app.yaml." However, I cannot find the stated app.yaml file anywhere in the repository. Where can I find it?

afischer commented 5 months ago

Hi @pvizan-artefact! Thanks for your question.

This seems like a typo on our end — we include an app.json here. I believe that GAE also supports .json app config files, but if not, you should be able to use a json to yaml converter like this one to transform this json file into yaml.

Sorry about the confusion, we will update our documentation!

pvizan-artefact commented 5 months ago

Thank you! On my side, I had an error when trying to deploy the app on Google App Engine whenever there was not a yaml file in the directory. I have tried to convert the json file to yaml as suggested, save it in the repository directory as app.yaml, and then ran the command: gcloud app deploy --project={my_project}

However, I get this error:

An error occurred while parsing file: [/Users/.../Code/library/app.yaml]
Unexpected attribute 'name' for object of type AppInfoExternal.

I did manage to find a file navigating through past commits called app.yaml. I manage to deploy the app and see this message at the end:

Setting traffic split for service [default]...done.                                                                                                 
Deployed service [default] to [https://**your_project_id**.appspot.com]
You can stream logs from the command line by running:
  $ gcloud app logs tail -s default
To view your application in the web browser run:
  $ gcloud app browse --project=**your_project_id**

Still, if I then open the appspot link, I get a "Service Unavailable" message on the website. (probably this file is deprecated and that is the reason, but just wanted to point out that file does get me a bit further)