Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.4k views
in Technique[技术] by (71.8m points)

deployment - How to Edit App.Yaml (Google Cloud Platform)

I am ready to deploy into the Google Cloud Platform but I have ran into a problem. The website won't deploy. Here is what the code displays:

ERROR: (gcloud.app.deploy) An error occurred while parsing file: [/home/jinthemix/app.yaml]
Unexpected attribute 'pi_version' for object of type AppInfoExternal.
  in "/home/jinthemix/app.yaml", line 1, column 13

Down below here is the app.yaml. I used vim app.yaml to get into the code. I am confused as to why it looks different from the code I wanted to use. So I am wondering how I can edit app.yaml so I can deploy.

I can't upload the code directly, can't copy and paste

This is the code I want to use:

runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /
  static_files: www/index.html
  upload: www/index.html

- url: /(.*)
  static_files: www/1
  upload: www/(.*)

(side note: How would I link the index.html? (when someone navigates to the root page of your website, what the person sees when clicking or going to the link of the site)) Here is where the html is located:

jinthemix@cloudshell:~ (website-deploying-gc)$ ls
app.yaml  IMD233  Files  README-cloudshell.txt  README.md  www
jinthemix@cloudshell:~ (website-deploying-gc)$ cd www
jinthemix@cloudshell:~/www (website-deploying-gc)$ ls
Mixs
jinthemix@cloudshell:~/www (website-deploying-gc)$ cd Mixs
jinthemix@cloudshell:~/www/Mixs (website-deploying-gc)$ ls
'Mix 1 (1)'  'Mix 2 (2)'  'Mix 3 (3)'  'Mix 4 (4)'
jinthemix@cloudshell:~/www/Mixs (website-deploying-gc)$ cd 'Mix (1)'
jinthemix@cloudshell:~/www/Mixs/Mix 1 (1) (website-deploying-gc)$ ls
'hello.html (B) (L2).html'  'hello.html (T) (L3).html'  'hello (L1).html'
jinthemix@cloudshell:~/www/Mixs/Mix 1 (1) (website-deploying-gc)$ cd
jinthemix@cloudshell:~ (website-deploying-gc)$ cd

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...