Commit d3543bbf authored by Birin Sanchez's avatar Birin Sanchez

Use PostgreSQL DB instead of SQLite3.

Signed-off-by: Birin Sanchez's avatarBirin Sanchez <birin.sanchez@puri.sm>
parent da4943b1
Pipeline #25426 passed with stage
in 32 seconds
......@@ -27,6 +27,7 @@ WooCommerce = "==1.2.1"
django-simple-captcha = "==0.5.10"
djangorestframework = "==3.9.2"
django-password-reset = "==2.0"
psycopg2-binary = "==2.8.2"
[dev-packages]
twine = "==1.12.1"
......
......@@ -16,3 +16,11 @@ TUNNEL_SECRET = secret
# jBv_8z3mq0jurqeB5MFYav1n6MTyWd4bOXJ8tzy9ywU=
TUNNEL_KEY = generate_your_own_key!
EMAIL_HOST_PASSWORD = v3r153cR37
# PostgreSQL config
PSQL_DB_NAME = django_middleware
PSQL_USER_NAME = django
PSQL_USER_PASSWORD = supersecret
PSQL_HOST = psql.example.com
PSQL_PORT = 5432
\ No newline at end of file
......@@ -127,10 +127,20 @@ AUTH_USER_MODEL = 'purist.User'
SQLITE_DB_PATH = config("SQLITE_DB_PATH")
PSQL_DB_NAME = secret_config('PSQL_DB_NAME')
PSQL_USER_NAME = secret_config('PSQL_USER_NAME')
PSQL_USER_PASSWORD = secret_config('PSQL_USER_PASSWORD')
PSQL_HOST = secret_config('PSQL_HOST')
PSQL_PORT = secret_config('PSQL_PORT')
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': SQLITE_DB_PATH,
'ENGINE': 'django.db.backends.postgresql',
'NAME': PSQL_DB_NAME,
'USER': PSQL_USER_NAME,
'PASSWORD': PSQL_USER_PASSWORD,
'HOST': PSQL_HOST,
'PORT': PSQL_PORT,
},
'ldap': {
'ENGINE': 'ldapdb.backends.ldap',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment