I am not able to deploy my django app with GCP. Here is what i am using.
DEBUG: Operation [operations/build/decorist-dsp/MGEwM2MwNzgtYjQ4MC00N2U1LWE1Y2YtYjc0MDVkMjQ2N2Fi] not complete. Waiting 1s.
DEBUG: Reading GCS logfile: 206 (read 5 bytes)
DONE
DEBUG: Operation [operations/build/decorist-dsp/MGEwM2MwNzgtYjQ4MC00N2U1LWE1Y2YtYjc0MDVkMjQ2N2Fi] complete. Result: {
"response": {
"finishTime": "2018-11-29T06:57:47.716547Z",
"status": "SUCCESS",
"timeout": "600s",
"startTime": "2018-11-29T06:54:49.114013221Z",
"artifacts": {
"images": [
]
},
"results": {
"images": [
{
"pushTiming": {
"endTime": "2018-11-29T06:57:46.824632425Z",
"startTime": "2018-11-29T06:57:14.495401323Z"
},
"digest": "sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
},
{
"pushTiming": {
"endTime": "2018-11-29T06:57:46.824632425Z",
"startTime": "2018-11-29T06:57:14.495401323Z"
},
"digest": "sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
}
],
"buildStepImages": [
"",
""
]
},
"createTime": "2018-11-29T06:54:48.470533291Z",
"timing": {
"PUSH": {
"endTime": "2018-11-29T06:57:46.824665689Z",
"startTime": "2018-11-29T06:57:14.495399545Z"
},
"FETCHSOURCE": {
"endTime": "2018-11-29T06:54:54.928030680Z",
"startTime": "2018-11-29T06:54:50.674392370Z"
},
"BUILD": {
"endTime": "2018-11-29T06:57:14.495384784Z",
"startTime": "2018-11-29T06:54:55.016315542Z"
}
},
"source": {
"storageSource": {
}
},
"options": {
"substitutionOption": "ALLOW_LOOSE",
"logging": "LEGACY"
},
"steps": [
{
"status": "SUCCESS",
"args": [
],
"env": [
"GAE_APPLICATION_YAML_PATH=app.yaml"
],
"timing": {
"endTime": "2018-11-29T06:54:57.238065066Z",
"startTime": "2018-11-29T06:54:55.016335403Z"
},
"pullTiming": {
"endTime": "2018-11-29T06:54:56.189796219Z",
"startTime": "2018-11-29T06:54:55.016335403Z"
}
},
{
"status": "SUCCESS",
"args": [
"build",
"-t",
"."
],
"env": [
"GAE_APPLICATION_YAML_PATH=app.yaml"
],
"timing": {
"endTime": "2018-11-29T06:57:14.044566954Z",
"startTime": "2018-11-29T06:54:57.238113746Z"
},
"pullTiming": {
"endTime": "2018-11-29T06:55:16.489745251Z",
"startTime": "2018-11-29T06:54:57.238113746Z"
}
}
],
"sourceProvenance": {
"resolvedStorageSource": {
"generation": "1543474485160299",
},
"fileHashes": {
}
},
"projectId": "decorist-dsp",
"images": [
],
"substitutions": {
"_GAE_APPLICATION_YAML_PATH": "app.yaml",
},
"id": "0a03c078-b480-47e5-a5cf-b7405d2467ab",
},
"done": true,
"name": "operations/build/decorist-dsp/MGEwM2MwNzgtYjQ4MC00N2U1LWE1Y2YtYjc0MDVkMjQ2N2Fi",
"metadata": {
"build": {
"finishTime": "2018-11-29T06:57:47.716547Z",
"status": "SUCCESS",
"timeout": "600s",
"startTime": "2018-11-29T06:54:49.114013221Z",
"artifacts": {
"images": [
]
},
"results": {
"images": [
{
"pushTiming": {
"endTime": "2018-11-29T06:57:46.824632425Z",
"startTime": "2018-11-29T06:57:14.495401323Z"
},
"digest": "sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
},
{
"pushTiming": {
"endTime": "2018-11-29T06:57:46.824632425Z",
"startTime": "2018-11-29T06:57:14.495401323Z"
},
"digest": "sha256:c2293fb7ee8fc9998d5c6777cdedeaf80360408df31375b6532be01d785bf828"
}
],
"buildStepImages": [
"",
""
]
},
"id": "0a03c078-b480-47e5-a5cf-b7405d2467ab",
"timing": {
"PUSH": {
"endTime": "2018-11-29T06:57:46.824665689Z",
"startTime": "2018-11-29T06:57:14.495399545Z"
},
"FETCHSOURCE": {
"endTime": "2018-11-29T06:54:54.928030680Z",
"startTime": "2018-11-29T06:54:50.674392370Z"
},
"BUILD": {
"endTime": "2018-11-29T06:57:14.495384784Z",
"startTime": "2018-11-29T06:54:55.016315542Z"
}
},
"source": {
"storageSource": {
}
},
"options": {
"substitutionOption": "ALLOW_LOOSE",
"logging": "LEGACY"
},
"steps": [
{
"status": "SUCCESS",
"args": [
],
"env": [
"GAE_APPLICATION_YAML_PATH=app.yaml"
],
"timing": {
"endTime": "2018-11-29T06:54:57.238065066Z",
"startTime": "2018-11-29T06:54:55.016335403Z"
},
"pullTiming": {
"endTime": "2018-11-29T06:54:56.189796219Z",
"startTime": "2018-11-29T06:54:55.016335403Z"
}
},
{
"status": "SUCCESS",
"args": [
"build",
"-t",
"."
],
"env": [
"GAE_APPLICATION_YAML_PATH=app.yaml"
],
"timing": {
"endTime": "2018-11-29T06:57:14.044566954Z",
"startTime": "2018-11-29T06:54:57.238113746Z"
},
"pullTiming": {
"endTime": "2018-11-29T06:55:16.489745251Z",
"startTime": "2018-11-29T06:54:57.238113746Z"
}
}
],
"sourceProvenance": {
"resolvedStorageSource": {
"generation": "1543474485160299",
},
"fileHashes": {
}
},
"projectId": "decorist-dsp",
"images": [
],
"substitutions": {
"_GAE_APPLICATION_YAML_PATH": "app.yaml",
},
"createTime": "2018-11-29T06:54:48.470533291Z",
}
}
}
DEBUG: Reading GCS logfile: 416 (no new content; keep polling)
----------------------------------------------------------------------------------------------------------------------------------------------
DEBUG: Converted YAML to JSON: "{
"betaSettings": {
"cloud_sql_instances": "decorist-dsp us-east1 postgresql-users-dev",
"module_yaml_path": "app.yaml",
"vm_runtime": "python"
},
"entrypoint": {
"shell": "gunicorn --preload -b :$PORT dj_main.wsgi"
},
"env": "flex",
"envVariables": {
"ALLOWED_HOST": "*",
"DB_HOST": "/cloudsql/decorist-dsp:us-east1:postgresql-users-dev",
"DB_NAME": "user_api_dev",
"DB_PASSWORD": "drtny23_",
"DB_PORT": "5432",
"DB_USER": "db_user",
"DEBUG": "True",
"SECRET_KEY": "+lzdjn1tsuei=#@8%5doa8hjxc0au3847k5*tq1^*(^(lapn6x",
},
"handlers": [
{
"securityLevel": "SECURE_OPTIONAL",
"staticFiles": {
"path": "static/\\1",
"uploadPathRegex": "static/.*"
},
"urlRegex": "/static/(.*)"
}
],
"runtime": "vm"
}"
DEBUG: Operation [apps/decorist-dsp/operations/aa030512-6dca-4899-abef-59fad4af0884] not complete. Waiting to retry.
Updating service [default] (this may take several minutes)...⠛DEBUG: Operation [apps/decorist-dsp/operations/aa030512-6dca-4899-abef-59fad4af0884] not complete. Waiting to retry.
Updating service [default] (this may take several minutes)...⠹DEBUG: Operation [apps/decorist-dsp/operations/aa030512-6dca-4899-abef-59fad4af0884] complete. Result: {
"metadata": {
"target": "apps/decorist-dsp/services/default/versions/20181129t122432",
"insertTime": "2018-11-29T06:57:50.940Z",
"method": "google.appengine.v1.Versions.CreateVersion"
},
"done": true,
"name": "apps/decorist-dsp/operations/aa030512-6dca-4899-abef-59fad4af0884",
"error": {
"message": "An internal error occurred during deployment.",
"code": 13
}
}
Updating service [default] (this may take several minutes)...failed.
DEBUG: (gcloud.app.deploy) Error Response: [13] An internal error occurred during deployment.
runtime: python
# the PROJECT-DIRECTORY is the one with settings.py and wsgi.py
entrypoint: gunicorn --preload -b :$PORT dj_main.wsgi # specific to a GUnicorn HTTP server deployment
env: flex # for Google Cloud Flexible App Engine
# any environment variables you want to pass to your application.
# accessible through os.environ['VARIABLE_NAME']
env_variables:
# the secret key used for the Django app (from PROJECT-DIRECTORY/settings.py)
SECRET_KEY: 'my-secret-key'
DEBUG: 'True' # always False for deployment
# everything after /cloudsql/ can be found by entering >> gcloud sql instances describe DATABASE-NAME << in your Terminal
# the DATABASE-NAME is the name you gave your project's PostgreSQL database
# the second line from the describe output called connectionName can be copied and pasted after /cloudsql/
ALLOWED_HOST: "*"
DB_HOST: '/cloudsql/myconnection'
DB_PORT: '5432' # PostgreSQL port
DB_NAME: 'my-db'
DB_USER: 'my-db-user' # either 'postgres' (default) or one you created on the PostgreSQL instance page
DB_PASSWORD: ''
handlers:
- url: /static
static_dir: static
beta_settings:
# from command >> gcloud sql instances describe DATABASE-NAME <<
cloud_sql_instances: "my own instance"
runtime_config:
python_version: 3 # enter your Python version BASE ONLY here. Enter 2 for 2.7.9 or 3 for 3.6.4