# App Engine

## Règles : 

<p class="callout warning">App engine supporte une seule application par projet !</p>

## Hello world : 

```
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
cd python-docs-samples/appengine/standard_python3/hello_world

```

Tester l'app :

```
dev_appserver.py app.yaml
```

Déployer dans app engine

```
gcloud app deploy
```

```
Services to deploy:

descriptor:                  [/home/nehemiebarkia/temp/python-docs-samples/appengine/standard_python3/hello_world/app.yaml]
source:                      [/home/nehemiebarkia/temp/python-docs-samples/appengine/standard_python3/hello_world]
target project:              [XXXXXXXXXX]
target service:              [default]
target version:              [XXXXXXXXXX]
target url:                  [https://XXXXX.ew.r.appspot.com]
target service account:      [App Engine default service account]


Do you want to continue (Y/n)?  y

Beginning deployment of service [default]...
Uploading 6 files to Google Cloud Storage
17%
33%
50%
67%
83%
100%
100%
File upload done.
```

Résultat :

[![image-1670413484849.png](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/scaled-1680-/image-1670413484849.png)](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/image-1670413484849.png)

[![image-1670413548829.png](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/scaled-1680-/image-1670413548829.png)](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/image-1670413548829.png)

[![image-1670413564325.png](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/scaled-1680-/image-1670413564325.png)](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/image-1670413564325.png)

[![image-1670413578372.png](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/scaled-1680-/image-1670413578372.png)](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/image-1670413578372.png)

[![image-1670413598039.png](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/scaled-1680-/image-1670413598039.png)](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/image-1670413598039.png)

[![image-1670413669202.png](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/scaled-1680-/image-1670413669202.png)](https://docs.nehemiebarkia.fr/uploads/images/gallery/2022-12/image-1670413669202.png)

Déployer une version sans qu'elle soit publiée :

```
gcloud app deploy --no-promote
```