pokeapi/config/docker-compose.py

29 lines
755 B
Python
Raw Permalink Normal View History

# Docker settings
2021-03-19 18:09:59 +00:00
import os
from .settings import *
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": os.environ.get("POSTGRES_DB", "pokeapi"),
2021-03-19 18:09:59 +00:00
"USER": os.environ.get("POSTGRES_USER", "ash"),
"PASSWORD": os.environ.get("POSTGRES_PASSWORD", "pokemon"),
"HOST": os.environ.get("POSTGRES_HOST", "db"),
2021-05-16 20:13:07 +00:00
"PORT": os.environ.get("POSTGRES_PORT", 5432),
}
}
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
2021-05-16 20:13:07 +00:00
"LOCATION": os.environ.get("REDIS_CONNECTION_STRING", "redis://cache:6379/1"),
2020-11-23 21:05:49 +00:00
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
}
}
DEBUG = False
2021-03-19 18:53:12 +00:00
2021-03-23 19:43:59 +00:00
ALLOWED_HOSTS = ["*"]