# ShellValier v2 ## Running the development environment In order to run the development environment locally: 1. Make sure you have [Docker Desktop](https://docs.docker.com/desktop/) and [Docker Compose](https://docs.docker.com/compose/) installed. 2. Set evn variable pointing to the path where yhe database will be located export DATABASE_DIR=<path to database dir in local file system> 2. Build and run the project by executing: ./docker/scripts/run-docker 3. In order to fulfill database execute belove commands docker-compose stop backend docker-compose run backend bash -> run ./reset_db.sh script in interactive bash -> exit interactive bash by typing ctrl-d docker-compose start backend By default the database is fulfilled by a small subset of the Polish Valence Dictionary. To load different dictionary file one have to run following tasks before executing ./reset_db.sh script: * download full Walenty dataset (TEI format can by downlowaded from http://zil.ipipan.waw.pl/Walenty) * unpack zip archive and place xml file in ./data/walenty * set environment variables WALENTY_FILE_NAME and PHRASE_TYPES_EXPAND_FILE_NAME to the name of files that will be loaded (e.g. export WALENTY_FILE_NAME=walenty_20210913.xml, export PHRASE_TYPES_EXPAND_FILE_NAME=phrase_types_expand_20210913.xml) In order to reinstall a database instance a folder specified by the DATABASE_DIR should be removed. ## Working in the development environment Whenever you need to establish an interactive bash session in the running application container, execute: ./docker/scripts/docker-bash ## Deploying to production In order to build the frontend Vue.js application for production execute the following command: docker-compose run frontend yarn build Compiled application files will be located in `frontend/dist/`. ## Default users ####Admin user * Login: shell * Password: valier ####Leksykograf user * Login: Leksykograf * Password: valier111 ####Super leksykograf user * Login: Superleksykograf * Hasło: valier111 ## Database manual migration export LOADING_THE_SLOWOSIEC_ONTOLOGY_HIERARCHY_DISABLED=true python manage.py makemigrations <module-name> (e.g. python manage.py makemigrations users) python manage.py migrate <module-name> (e.g. python manage.py migrate users)