-
Notifications
You must be signed in to change notification settings - Fork 10
Test and production environments
Massimo edited this page Jan 22, 2019
·
8 revisions
- Install Docker;
- In your terminal launch the following commands:
git clone https://github.com/Wikidata/soweego.git
cd soweegoIt's useful when you are developing or testing some features. In this environment, you don't need to be afraid of breaking stuff.
It provides you with a MariaDB instance and a BASH shell ready to run soweego CLI commands. You are free to change soweego code while the shell is opened, the code is synced.
- In your terminal, move to the project root;
- Launch
./scripts/docker/launch_test.sh; - You are now in a Docker container BASH shell with a fully working soweego instance;
- Run
cd soweego; - You are set. To check if it's working, try
python -m soweego.
| Option | Expected Value | Default Value | Description |
|---|---|---|---|
| -s | directory path | /tmp/soweego_shared |
Tells docker which folder in your machine will be shared with soweego container. |
The test environment comes with a running MariaDB instance. To query it from your terminal:
-
docker exec -it soweego_db_1 /bin/bash; -
mysql -uroot -hlocalhost -pdba soweego.
-
./scripts/docker/launch_prod.sh; - if you want to override the production database credentials, pass the above script a JSON file formatted as per
${PROJECT_ROOT}/soweego/importer/resources/db_credentials.json.