Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By Al3xs
I re-deployed my Django App on DO’s app platform but I am facing a new issue that I did not encounter before. Once successfully deployed, when I try to go into the console and run Django’s Migrate Command (python manage.py migrate) the following error is raised:
django.db.utils.OperationalError: could not translate host name “app-[…].db.ondigitalocean.com” to address: Temporary failure in name resolution
POSTGRES_DB: ${db.DATABASE}
POSTGRES_HOST: ${db.HOSTNAME}
POSTGRES_USER: ${db.USERNAME}
POSTGRES_PASSWORD: ${db.PASSWORD}
POSTGRES_PORT: ${db.PORT}
DATABASE_URL: ${db.DATABASE_URL}
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"HOST": os.getenv("POSTGRES_HOST"),
"NAME": os.getenv("POSTGRES_DB"),
"PASSWORD": os.getenv("POSTGRES_PASSWORD"),
"USER": os.getenv("POSTGRES_USER"),
"PORT": os.getenv("POSTGRES_PORT", 0),
}
}
The Database is called db (default).
I can connect to the database with the given connection details with my local PostgreSQL client.
I don’t know what else to try. Thanks in advance!
Aakash Singh
Frank Tufano
fullammo
4ae272398ee6445a9bf73f4cd632b5
eddie
Taha Aziz Ben Ali
Telmo Valverde
Alexandre Herlinvaux
52d4eff26a544eefb189e2005836b2
EatingAquamarineScubaDiver
f25932a0b984430fb48c4256f1aaad