From 96ada1266bc6d09ed179a2e0facf20f386b1afcc Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Sat, 2 May 2020 13:40:29 +0200 Subject: [PATCH 1/2] fix --- bootstrap/config.py | 2 ++ oshipka.sh | 1 + requirements.txt | 1 + 3 files changed, 4 insertions(+) diff --git a/bootstrap/config.py b/bootstrap/config.py index c2f6fb7..d20252b 100644 --- a/bootstrap/config.py +++ b/bootstrap/config.py @@ -12,6 +12,8 @@ TASKS_PROC_DIR = os.path.join(TASKS_DIR, "proc") DATABASE_FILE = os.path.join(DATA_DIR, "db.sqlite") SQLALCHEMY_DATABASE_URI = 'sqlite:///{}'.format(DATABASE_FILE) +SEARCH_INDEX_PATH = os.path.join(DATA_DIR, "search_index") + TEMPLATES_FOLDER = os.path.join(basepath, "webapp", "templates") STATIC_FOLDER = os.path.join(basepath, "webapp", "static") diff --git a/oshipka.sh b/oshipka.sh index ead4fbc..6bc8512 100755 --- a/oshipka.sh +++ b/oshipka.sh @@ -43,6 +43,7 @@ install_reqs() { link_dev_oshipka() { source venv/bin/activate pip install -e ${OSHIPKA_PATH} + pip install -e ${TWW_PATH} } install_cert() { diff --git a/requirements.txt b/requirements.txt index ee4c346..4d7124e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,5 +30,6 @@ SQLAlchemy==1.3.15 SQLAlchemy-Utils==0.36.3 watchdog==0.10.2 Werkzeug==1.0.0 +whooshalchemy==0.3.1 WTForms==2.2.1 zipp==3.1.0 From 417ab35d255475b2293750bb604e1f5873de621f Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Sat, 2 May 2020 22:28:37 +0200 Subject: [PATCH 2/2] update init dev --- bootstrap/requirements.txt | 1 - oshipka.sh | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bootstrap/requirements.txt b/bootstrap/requirements.txt index f028d96..e69de29 100644 --- a/bootstrap/requirements.txt +++ b/bootstrap/requirements.txt @@ -1 +0,0 @@ -git+https://gitlab.com/pisquared/oshipka \ No newline at end of file diff --git a/oshipka.sh b/oshipka.sh index 6bc8512..f3591e3 100755 --- a/oshipka.sh +++ b/oshipka.sh @@ -11,8 +11,11 @@ HELP=" Usage $0 [ bootstrap | worker | web | venv | install | link | cert ] bootstrap [PROJECT_PATH] Create a new project in PROJECT_PATH + init Install dev env + worker Start worker web Start webapp + venv Init venv install Install requirements link Link dev oshipka @@ -46,6 +49,12 @@ link_dev_oshipka() { pip install -e ${TWW_PATH} } +init() { + init_venv + install_reqs + link_dev_oshipka +} + install_cert() { #[ ! -f /tmp/certbot-auto ] && wget -O /tmp/certbot-auto https://dl.eff.org/certbot-auto #chmod +x /tmp/certbot-auto @@ -103,6 +112,8 @@ command_main() { case "$INITIAL_COMMAND" in bootstrap) bootstrap "$@" ;; + init) init "$@" + ;; worker) worker "$@" ;; web) web "$@"