aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-07-20 19:25:42 +0530
committerBobby <[email protected]>2022-07-20 19:25:42 +0530
commite5c9b08d0b18f5ea17211c0b98481dbb81e49c61 (patch)
tree3a7c934b7b947a956a9bb7b4a18a8da46d9172eb
parent2d3a43d1f9a6ab32974d5a2e12af76684644faa7 (diff)
downloadthatcomputerscientist-e5c9b08d0b18f5ea17211c0b98481dbb81e49c61.tar.xz
thatcomputerscientist-e5c9b08d0b18f5ea17211c0b98481dbb81e49c61.zip
Migrating to SQLite3
-rw-r--r--fly.toml5
-rw-r--r--thatcomputerscientist/settings.py13
2 files changed, 7 insertions, 11 deletions
diff --git a/fly.toml b/fly.toml
index 52ab8470..237971b1 100644
--- a/fly.toml
+++ b/fly.toml
@@ -41,3 +41,8 @@ processes = []
[[statics]]
guest_path = "/app/public"
url_prefix = "/static/"
+
+[mounts]
+ source="data"
+ destination="/data"
+
diff --git a/thatcomputerscientist/settings.py b/thatcomputerscientist/settings.py
index 183cdde9..38438b3f 100644
--- a/thatcomputerscientist/settings.py
+++ b/thatcomputerscientist/settings.py
@@ -84,17 +84,8 @@ WSGI_APPLICATION = 'thatcomputerscientist.wsgi.application'
DATABASES = {
'default': {
- 'ENGINE': 'django_psdb_engine',
- 'NAME': os.getenv('DB_DATABASE'),
- 'USER': os.getenv('DB_USER'),
- 'PASSWORD': os.getenv('DB_PASSWORD'),
- 'HOST': os.getenv('DB_HOST'),
- 'PORT': os.getenv('DB_PORT'),
- 'OPTIONS': {
- 'ssl': {
- 'ca': os.getenv('MYSQL_ATTR_SSL_CA'),
- }
- }
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': os.path.join(BASE_DIR, 'db.sqlite3') if os.getenv('ENVIRONMENT') == 'development' else ('/data/db.sqlite3'),
}
}