Skip to content

Test and production environments

Massimo edited this page Jan 22, 2019 · 8 revisions

Get started

  1. Install Docker;
  2. In your terminal launch the following commands:
git clone https://github.com/Wikidata/soweego.git
cd soweego

Test environment

It'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.

What do you need to run it?

How do you run it?

  1. In your terminal, move to the project root;
  2. Launch ./scripts/docker/launch_test.sh;
  3. You are now in a Docker container BASH shell with a fully working soweego instance;
  4. Run cd soweego;
  5. You are set. To check if it's working, try python -m soweego.

launch_test.sh options

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.

How do you connect with the local database instance?

The test environment comes with a running MariaDB instance. To query it from your terminal:

  1. docker exec -it soweego_db_1 /bin/bash;
  2. mysql -uroot -hlocalhost -pdba soweego.

Launch the production environment

  1. ./scripts/docker/launch_prod.sh;
  2. 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.

Clone this wiki locally