Commit 32c97df5 authored by Konstantin Schulz's avatar Konstantin Schulz

database migrations (e.g. upgrades) now only happen in the corpus storage manager

parent 8bf2f3b2
Pipeline #11592 passed with stages
in 2 minutes and 57 seconds
...@@ -35,7 +35,7 @@ services: ...@@ -35,7 +35,7 @@ services:
stdin_open: true stdin_open: true
tty: true tty: true
volumes: volumes:
- $PWD/mc_frontend/www:/home/mc/mc_frontend/www - ./mc_frontend/www:/home/mc/mc_frontend/www
mcserver: mcserver:
build: build:
context: ./mc_backend context: ./mc_backend
...@@ -58,7 +58,7 @@ services: ...@@ -58,7 +58,7 @@ services:
- "8100:80" - "8100:80"
restart: always restart: always
volumes: volumes:
- $PWD/mc_frontend/www:/usr/share/nginx/html - ./mc_frontend/www:/usr/share/nginx/html
- ./mc_frontend/nginx.conf:/etc/nginx/nginx.conf - ./mc_frontend/nginx.conf:/etc/nginx/nginx.conf
volumes: volumes:
db-data: db-data:
...@@ -67,6 +67,7 @@ def full_init(app: Flask, is_csm: bool) -> None: ...@@ -67,6 +67,7 @@ def full_init(app: Flask, is_csm: bool) -> None:
from mcserver.app.services import CustomCorpusService from mcserver.app.services import CustomCorpusService
if is_csm: if is_csm:
from mcserver.app.services.databaseService import DatabaseService from mcserver.app.services.databaseService import DatabaseService
DatabaseService.init_db_alembic()
DatabaseService.init_db_update_info() DatabaseService.init_db_update_info()
DatabaseService.update_exercises(is_csm=is_csm) DatabaseService.update_exercises(is_csm=is_csm)
DatabaseService.init_db_corpus() DatabaseService.init_db_corpus()
...@@ -90,8 +91,6 @@ def init_app_common(cfg: Type[Config] = Config, is_csm: bool = False) -> Flask: ...@@ -90,8 +91,6 @@ def init_app_common(cfg: Type[Config] = Config, is_csm: bool = False) -> Flask:
db.init_app(app) db.init_app(app)
migrate.init_app(app, db) migrate.init_app(app, db)
db.create_all() db.create_all()
from mcserver.app.services.databaseService import DatabaseService
DatabaseService.init_db_alembic()
from mcserver.app.services.textService import TextService from mcserver.app.services.textService import TextService
TextService.init_proper_nouns_list() TextService.init_proper_nouns_list()
TextService.init_stop_words_latin() TextService.init_stop_words_latin()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment