Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
221 lines (166 sloc) 7.68 KB
Manual how to install the DSW instance on your own via Docker


Global Instance

The application is currently deployed on a server provided by FIT CTU. Here are the addresses of running applications:

{% hint style="info" %} You are free to register and test out the Wizard within the Then you can decide if you want a local instance for you or your organization. {% endhint %}

Register your instance

{% hint style="warning" %} If you've deployed a local instance of the Wizard (Docker or build from source), we kindly request you to fill out this form:


We recommend using Docker for running the Wizard. We provide publicly two images via public repository of Docker Hub registry:

Docker Compose

The simplest way is to use Docker Compose. Requirements are just to have Docker installed and the Docker daemon started.

  1. Create a folder (e.g., /dsw, all commands in this manual are from this working directory)
  2. Prepare a app-config.cfg file for server described in Configuration and worker-config.json from below
  3. Prepare everything for dockerized Mongo DB (and not your local):
    1. Copy mongo/docker-compose.yml provided below
    2. Run MongoDB with Docker compose cd mongo sudo docker-compose up -d cd ..
  4. Copy (and adjust) docker-compose.ymlprovided below
  5. Run the DSW with Docker compose sudo docker-compose up -d
  6. After starting up, you will be able to open the Wizard in your browser on http://localhost

{% code-tabs %} {% code-tabs-item title="worker-config.json" %}

	"comment": "Synchronize all feedbacks with GitHub (runs every day at 2am)",
    "schedule":"0 2 * * *",
    "command":"wget --header \"Authorization: Bearer ${SERVICE_TOKEN}\" \"${API_URL}/feedbacks/synchronization\""

{% endcode-tabs-item %} {% endcode-tabs %}

{% code-tabs %} {% code-tabs-item title="docker-compose.yml" %}

version: '3'

    image: datastewardshipwizard/server
    restart: always
      - 3000:3000
      - /dsw/app-config.cfg:/dsw/config/app-config.cfg
      - mongo_mongo_1:mongo
      - default
      - mongo_default

    image: datastewardshipwizard/client
    restart: always
      - 80:80
      - API_URL=http://localhost:3000
    image: datastewardshipwizard/crontab
    restart: always
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /dsw/worker-config.json:/opt/crontab/config.json
      - API_URL=http://localhost:3000

    external: true

{% endcode-tabs-item %} {% endcode-tabs %}

{% code-tabs %} {% code-tabs-item title="mongo/docker-compose.yml" %}

version: '3'
        image: mongo:3.0.15
        restart: always
          - 27017:27017
          - /dsw/data:/data/db
        command: mongod

{% endcode-tabs-item %} {% endcode-tabs %}

Images Details

The server images is based onstack-hpack image. Our image contains both - source codes and compiled application. An advantage is that we do not have to have 2 images - one for build and one for running a compiled application. A disadvantage is a size of Docker image (it has to include source codes and build tools).

For the client, the Docker image is based on nginxthat simply serves the static files built by webpack.

We build our Docker images automatically after a detected change in a master branch. A produced images are then uploaded to the Docker registry.

Local deployment

General requirements


  1. Get the server app (dsw-server) git clone
  2. Copy and edit configuration (see Configuration) cp config/app-config.cfg.example config/app-config.cfg
  3. Build stack build
  4. Run stack exec dsw-server


  1. Get the client app (dsw-client) git clone
  2. Install the app (dependencies) npm install
  3. Export API_URL environment variable (see Configuration)
  4. Run the app npm start
  5. Open app in your favorite browser
  6. For minified production-ready version, use npm run build

Default users

Initially, migrations will fill the database with predefined data needed including three users, all with password "password":

You can use those accounts for testing or to initially made your own account admin and then delete them.

{% hint style="danger" %} Having public instance with default accounts is a security risk. Delete or change default accounts (mainly Albert Einstein) if your DSW instance is public as soon as possible. {% endhint %}

Setup Knowledge Model

When you have a fresh installation, there are just default users and no knowledge models. You are free to create a new one from scratch if you want. Other option is to download file from ds-wizard/km-elixir-root and import it (see Usage). It is the core knowledge model for general data stewardship.

If you also need to enable Public Questionnaire functionality with this core knowledge model, you have to download public-questionnaire.json file below and import it directly to the database.

{% file src=".gitbook/assets/public-questionnaire.json" caption="Public questionnaire" %}

mongoimport --db dsw-server \ 
            --collection publicQuestionnaires \
            --file public-questionnaire.json

(If you are running Mongo in Docker, you want to use docker exec.)

Database backup

If you want to regularly backup your database, all you need to do is to set-up simple script as cronjob:

{% code-tabs %} {% code-tabs-item title="" %}

# Location of Mongo's data folder (Dockerized Mongo)
# - or your Mongo without using Docker
# - MONGO_DATA_DIR=/data/db
# Target for storing backups
# Backup
BACKUP_FILE=$TARGET_DIR/backup_$(date +%d%m%y-%H%M).tgz

{% endcode-tabs-item %} {% endcode-tabs %}

Make it executable (chmod a+x and add it as cronjob with crontab -e:

{% code-tabs %} {% code-tabs-item title="crontab" %}

0 4 * * * /dsw/

{% endcode-tabs-item %} {% endcode-tabs %}

This will do the backup every day at 4:00 AM. For more information, see

{% hint style="warning" %} Ensure that you run the script with user that you want and that the target backup directory (e.g. /var/backups/dsw) exists. {% endhint %}