Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Django Snippet Postgresql

17 Nov 2020 »
version: "3"

services:
  db: 
    image: postgres:13
    ports:
      - 5432:5432
    environment:
      - POSTGRES_DB=app
      - POSTGRES_USER=admin
      - POSTGRES_PASSWORD=admin

<project>/settings.py

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'HOST': 'localhost',
        'NAME': 'app',
        'USER': 'admin',
        'PASSWORD': 'admin'
    } 
}
...