test postgres
This commit is contained in:
parent
b71edece2e
commit
c1428592d8
3 changed files with 31 additions and 4 deletions
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
version: '3.4'
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
POSTGRES_DB: suitablephones
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/posgresql/data
|
||||
|
||||
|
||||
volumes:
|
||||
pgdata:
|
|
@ -76,14 +76,24 @@ WSGI_APPLICATION = 'mysuitablephone.wsgi.application'
|
|||
# Database
|
||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
|
||||
|
||||
#DATABASES = {
|
||||
# 'default': {
|
||||
# 'ENGINE': 'django.db.backends.sqlite3',
|
||||
# 'NAME': BASE_DIR / 'db.sqlite3',
|
||||
# }
|
||||
#}
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
"NAME": "suitablephones",
|
||||
"USER": "postgres",
|
||||
"PASSWORD": "postgres",
|
||||
"HOST": "localhost",
|
||||
'PORT': 5432,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
|
||||
|
||||
|
@ -129,4 +139,4 @@ REST_FRAMEWORK = {
|
|||
'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend']
|
||||
}
|
||||
|
||||
LINEAGEWIKI = '/home/d0c/Code/lineage_wiki'
|
||||
LINEAGEWIKI = '/home/francesco/Code/lineage_wiki'
|
|
@ -3,3 +3,4 @@ pyyaml
|
|||
djangorestframework
|
||||
markdown
|
||||
django-filter
|
||||
psycopg2-binary
|
||||
|
|
Loading…
Reference in a new issue