Hi, we have an app that utilizes two databases. Previously, we had the two
databases on the same instance in Cloud SQL, but we want to split the
databases into separate instances. We're having issues connecting the
databases to our Django app engine service. Is this even possible? If so,
how would the app.yaml look?
old app.yaml
runtime: custom
env: flex
entrypoint: gunicorn --timeout 360 --graceful-timeout 360 -b :$8080
localinsights.wsgi
beta_settings:
cloud_sql_instances: <CONNECTION>
runtime_config:
python_version: 3.6
env_variables:
SQLALCHEMY_DATABASE_URI: >-
postgresql+psycopg2://<USER>:<PASSWORD>/<DB>?host=/cloudsql/<CONNECTION>
settings.py
DATABASES['default'] = {
'HOST': '/cloudsql/<CONNECTION>',
'ENGINE': 'psqlextra.backend',
'NAME': '<USER_DB>',
'USER': '<USER>',
'PASSWORD': '<PASSWORD>'
}
DATABASES['NUMBER_2'] = {
'HOST': '/cloudsql/<CONNECTION>',
'ENGINE': 'psqlextra.backend',
'NAME': 'NUMBER_2',
'USER': '<USER>',
'PASSWORD': '<PW>'
}
--
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/74d7e99d-daf1-452b-8882-fcc9f5f1ada1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.