]> git.p6c8.net - pcdenotes.git/commitdiff
Switched from SQLite3 to MariaDB / MySQL
authorPatrick Canterino <patrick@patrick-canterino.de>
Sun, 23 Jan 2022 16:53:38 +0000 (17:53 +0100)
committerPatrick Canterino <patrick@patrick-canterino.de>
Sun, 23 Jan 2022 16:55:25 +0000 (17:55 +0100)
pcdenotes/settings.py
requirements.txt

index fdd29e406d48aac2b52b4eb93b4c781b8493635c..db9476f1c3d4ee2ed7d4a420bc4b5db257f97e2a 100644 (file)
@@ -82,8 +82,12 @@ WSGI_APPLICATION = 'pcdenotes.wsgi.application'
 
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.sqlite3',
-        'NAME': BASE_DIR / 'db.sqlite3',
+        'ENGINE': 'django.db.backends.mysql',
+        'NAME': str(os.getenv('PCDENOTES_DB_NAME')),
+        'HOST': str(os.getenv('PCDENOTES_DB_HOST')),
+        'PORT': int(os.getenv('PCDENOTES_DB_PORT')),
+        'USER': str(os.getenv('PCDENOTES_DB_USER')),
+        'PASSWORD': str(os.getenv('PCDENOTES_DB_PASSWORD'))
     }
 }
 
index ff18f3b88571eaf29708fbe5289dd86d6e29c87e..e7359d4023a20884b015b633f547227b3d34c6dd 100644 (file)
@@ -4,6 +4,7 @@ Django==3.2.11
 django-markdownify==0.9.0
 importlib-metadata==4.8.3
 Markdown==3.3.6
+mysqlclient==2.1.0
 packaging==21.3
 pkg-resources==0.0.0
 pyparsing==3.0.6

patrick-canterino.de