fixed docker specific paths so that everything works...
This commit is contained in:
+1
-1
@@ -8,4 +8,4 @@ services:
|
|||||||
- 8080:8080
|
- 8080:8080
|
||||||
volumes: # when pushing to server, remove the first dot here in front of /mnt
|
volumes: # when pushing to server, remove the first dot here in front of /mnt
|
||||||
- ./mnt/ssd/ds_ftp/classla_OS2022:/usr/src/app/classla_OS2022
|
- ./mnt/ssd/ds_ftp/classla_OS2022:/usr/src/app/classla_OS2022
|
||||||
- ./swagger_server/classla/classla_resources:/root/classla_resource
|
- ./swagger_server/classla/classla_resources:/root/classla_resources
|
||||||
|
|||||||
@@ -2,13 +2,18 @@ from peewee import *
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import os
|
import os
|
||||||
|
|
||||||
if not os.path.exists('requets_db/dbs'):
|
LOCAL_PATH = "requets_db/dbs"
|
||||||
print("---!--- requests_db/dbs doesn't exist")
|
SERVER_PATH = "swagger_server/requets_db/dbs"
|
||||||
print("lsing .")
|
|
||||||
print(os.listdir('.'))
|
|
||||||
os.mkdir('./requets_db/dbs')
|
|
||||||
|
|
||||||
DB = 'requets_db/dbs/jobs.db'
|
if not os.path.exists(LOCAL_PATH):
|
||||||
|
if os.path.exists('requets_db'):
|
||||||
|
os.makedirs(LOCAL_PATH, exist_ok=True)
|
||||||
|
elif os.path.exists('swagger_server/requets_db'):
|
||||||
|
os.makedirs(SERVER_PATH, exist_ok=True)
|
||||||
|
|
||||||
|
DB = f'{LOCAL_PATH}/jobs.db'
|
||||||
|
if not os.path.exists(LOCAL_PATH):
|
||||||
|
DB = f'{SERVER_PATH}/jobs.db'
|
||||||
db = SqliteDatabase(DB, pragmas={
|
db = SqliteDatabase(DB, pragmas={
|
||||||
# 'journal_mode': 'wal',
|
# 'journal_mode': 'wal',
|
||||||
'cache_size': -1 * 128 * 1024, # 128MB
|
'cache_size': -1 * 128 * 1024, # 128MB
|
||||||
|
|||||||
Reference in New Issue
Block a user