-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.json
33 lines (33 loc) · 1.42 KB
/
app.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"name": "document-ai-adapter",
"env": {
"GCP_DOCAI_REGION": {
"value": "eu",
"description": "Region (eu or us) where the Document AI form processor is deployed."
},
"GCP_DOCAI_PROCESSOR_ID": {
"description": "The Document AI form processor ID from the deployment (visible in the overview information for the processor)."
},
"API_KEY": {
"generator": "secret",
"description": "A secret that to be used to access the API."
}
},
"options": {
"allow-unauthenticated": true
},
"hooks": {
"postbuild": {
"commands": [
"gcloud config set project $GOOGLE_CLOUD_PROJECT",
"gcloud services enable appengine.googleapis.com",
"gcloud services enable firebase.googleapis.com",
"gcloud services enable drive.googleapis.com",
"gcloud app create --region=europe-west",
"gcloud firestore databases create --region=europe-west",
"PROJECTNUMBER=$(gcloud projects list --filter=\"$(gcloud config get-value project)\" --format=\"value(PROJECT_NUMBER)\") && gcloud projects add-iam-policy-binding $GOOGLE_CLOUD_PROJECT --member=\"serviceAccount:[email protected]\" --role='roles/documentai.apiUser'",
"echo $API_KEY"
]
}
}
}