-
Notifications
You must be signed in to change notification settings - Fork 11
FAQ #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
FAQ #42
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
title: Déploiement sur Google App Engine | ||
description: Comment déployer une application Nuxt.js sur Google App Engine ? | ||
--- | ||
|
||
# Comment déployer une application Nuxt.js sur Google App Engine ? | ||
|
||
Déployer sur [Google App Engine](https://cloud.google.com/appengine/) est une solution rapide et facile pour héberger vos applications universelles Nuxt sur le service de Cloud Google. | ||
|
||
Dans ce guide, nous construisons l'application localement puis nous envoyons simplement l'intégralité du répertoire du projet vers Google App Engine. Après l'envoi, Google App Engine démarrera automatiquement le script `start` de votre fichier package.json et votre application sera disponible immédiatement. | ||
|
||
## Pour commencer | ||
|
||
Vérifz que vous avez un compte Google Cloud, un projet et une application Google App Engine vierge définie sur [Google App Engine](https://cloud.google.com/appengine/). De plus, assurez-vous de télécharger et d'installer Cloud SDK (CLI) depuis Google comme expliqué [ici](https://cloud.google.com/sdk/) et connectez-vous à vote compte Google Cloud. | ||
|
||
## Configurer votre application | ||
|
||
Tout ce que vous avez besoin d'ajouter à votre application universelle Nuxt pour la déployer sur le Moteur d'Application est un fichier appelé `app.yaml`. Créez un nouveau fichier avec ce nom dans votre dossier racine et ajoutez le contenu suivant : | ||
|
||
```yaml | ||
runtime: nodejs10 | ||
|
||
instance_class: F2 | ||
|
||
handlers: | ||
- url: /_nuxt | ||
static_dir: .nuxt/dist/client | ||
secure: always | ||
|
||
- url: /(.*\.(gif|png|jpg|ico|txt))$ | ||
static_files: static/\1 | ||
upload: static/.*\.(gif|png|jpg|ico|txt)$ | ||
secure: always | ||
|
||
- url: /.* | ||
script: auto | ||
secure: always | ||
|
||
env_variables: | ||
HOST: '0.0.0.0' | ||
NODE_ENV: 'production' | ||
``` | ||
|
||
## Construire et déployer l'application | ||
|
||
Maintenant, construisez votre application avec `npm run build`. | ||
|
||
À cet instant, votre application est prête à être envoyée au Moteur d'Application Google. Maintenant lancer la commande suivante : | ||
|
||
``` | ||
gcloud app deploy app.yaml --project <project-id> | ||
``` | ||
|
||
Voilà ! Votre application Nuxt.js est maintenant hébergée le me Moteur d'Application Google ! | ||
|
||
## Pour plus d'information | ||
|
||
- L'attribut `instance_class` dans votre fichier app.yaml définit la classe d'instance d'application. Instance F2 n'est pas complètement libre, mais possède le minimum de mémoire nécessaire pour exécuter une application Nuxt. | ||
- Assurez-vous de renseigner le project-id et non pas le project-name dans la commande de déploiement. Ce sont deux choses différentes - mais facile à confondre. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phrase en anglais :
"We'll host super cheap with some AWS services. Briefly:"
si vous avez une idée pour la traduction ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour moi le mieux serait d'enlever la phrase en français et de faire une PR sur le repo anglais pour l'enlever également.