Skip to content

Commit

Permalink
Change data location on server
Browse files Browse the repository at this point in the history
  • Loading branch information
samirelanduk committed Oct 21, 2019
1 parent 460f73e commit 7611233
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions core/settings.py
Expand Up @@ -34,10 +34,16 @@
"corsheaders.middleware.CorsMiddleware",
]

DATABASES = {"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "data", "db.sqlite3")
}}
if DEBUG:
DATABASES = {"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "data", "db.sqlite3")
}}
else:
DATABASES = {"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "..", "data", "db.sqlite3")
}}

STATIC_URL = "/static/"
STATIC_ROOT = os.path.abspath(f"{BASE_DIR}/../static")
Expand Down
4 changes: 2 additions & 2 deletions upload-data.sh
@@ -1,5 +1,5 @@
host="api.zincbind.net"

scp data/db.sqlite3 $host:~/$host/source/data/
scp data/db.sqlite3 $host:~/$host/data/

scp data/chains.fasta* $host:~/$host/source/data/
scp data/chains.fasta* $host:~/$host/data/

0 comments on commit 7611233

Please sign in to comment.