3

I want to deploy a django application in app engine flexible.

I'm having trouble performing python manage.py migrate from my application, using cloud_sql_prox I performed the following steps

Initialize the Cloud SQL instance ./cloud_sql_proxy -instances = "[cei-bd]" = tcp: 5432 More when executing python manage.py migrate You have this message

Is the server running locally and accepting connections on Unix domain socket "/cloudsql/teste-2-195911:us-east1:teste-bd/.s.PGSQL.5432"?

Settings.py

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.postgresql',
    'NAME': 'teste',
    'USER': 'teste-prod',
    'PASSWORD': 'osgeniteste',
    'PORT': '5432',
    'HOST': '/cloudsql/teste-2-195911:us-east1:teste-bd',
}}

app.yaml

runtime: python
env: flex
entrypoint: gunicorn -b :$PORT osgeni.wsgi

beta_settings:
    cloud_sql_instances: teste-2-195911:us-east1:teste-bd

runtime_config:
  python_version: 3
2
  • Are you testing this locally? And what’s your operating system? Mar 15, 2018 at 19:51
  • I'm using Linux Mint Mar 21, 2018 at 17:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.