mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-20 09:55:10 -04:00
use setup.py to determine dependencies in Dockerfile instead of egg-info requires.txt
This commit is contained in:
parent
0407d03b6b
commit
e61e12c889
4 changed files with 57 additions and 47 deletions
|
@ -1075,6 +1075,11 @@ def setup_django(out_dir: Path=None, check_db=False, config: ConfigDict=CONFIG,
|
|||
call_command("migrate", interactive=False, verbosity=0)
|
||||
else:
|
||||
django.setup()
|
||||
|
||||
# Enable WAL mode in sqlite3
|
||||
from django.db import connection
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute("PRAGMA journal_mode=wal;")
|
||||
|
||||
if check_db:
|
||||
sql_index_path = Path(output_dir) / SQL_INDEX_FILENAME
|
||||
|
|
|
@ -107,9 +107,6 @@ DATABASES = {
|
|||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': DATABASE_NAME,
|
||||
'OPTIONS': {
|
||||
'init_command': 'PRAGMA journal_mode=wal;',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue