I have a Django application with Google Cloud SQL Postgres Database 
deployed to App Engine Flex at the moment.

I am trying to migrate it from Flex to Standard.

Everything seems to work, except the Database connection. The Documentation 
is not quite clear about it.

For Flex I need to use:

>
> beta_settings:
>   cloud_sql_instances: eco-income:europe-west3:ecoincome-postgres
>
>
in app.yaml.


In Standard, I tried with and without, but I always get a connection 
refused.

Did anyone get this working?

 




--------------------------------------------------------------------------------

Flex:

> runtime: python
>
> env: flex
>
> manual_scaling:
>   instances: 1
>
> resources:
>   cpu: 0.2
>   memory_gb: 0.5
>   disk_size_gb: 10
>
> health_check:
>  enable_health_check: False
>
> runtime_config:
>   python_version: 3
>
> entrypoint: web/run.sh
>
> env_variables:
>   SECRET_KEY: '___DJANGO_SECRET_KEY___'
>   DEBUG: 'True' # always False for deployment
>   SMTP_HOST: "___SMTP_HOST___"
>   SMTP_USER: "___SMTP_USER___"
>   SMTP_PASSWORD: "___SMTP_PASSWORD___"
>   DB_HOST: '/cloudsql/.........................'
>   DB_PORT: '5432' # PostgreSQL port
>   DB_NAME: '......'
>   DB_USER: '........'
>   DB_PASSWORD: '___DB_PASSWORD___'
>   STATIC_URL: 
> 'https://storage.googleapis.com/................-backend-static-files/static/'
>  # this is the url that you sync static files to
>
> handlers:
> - url: /.*
>   script: auto
>   secure: always
>
> beta_settings:
>   cloud_sql_instances: .....................
>
>  


Standard:

> runtime: python37
>
> entrypoint: web/run.sh
>
> env_variables:
>   SECRET_KEY: '___DJANGO_SECRET_KEY___'
>   DEBUG: 'True' # always False for deployment
>   SMTP_HOST: "___SMTP_HOST___"
>   SMTP_USER: "___SMTP_USER___"
>   SMTP_PASSWORD: "___SMTP_PASSWORD___"
>   DB_HOST: '/cloudsql/.........................'  DB_PORT: '5432' # 
> PostgreSQL port
>
>   DB_NAME: '......'
>   DB_USER: '........'
>
> DB_PASSWORD: '___DB_PASSWORD___'
>
>   STATIC_URL: 
> 'https://storage.googleapis.com/................-backend-static-files/static/'
>  # this is the url that you sync static files to 
>
>  
>
> beta_settings:
>>
>>   cloud_sql_instances: .....................
>>
>>  

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/4f300ae9-a6d2-4858-8472-944d95485362%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to