OpenSlides/dev-commands/set-ds.sh
2020-11-03 12:14:09 +01:00

11 lines
369 B
Bash
Executable File

#!/bin/bash
set -e
cd "$(dirname $0)"
# first argument is the example data
DATA=$(cat ${1:-../docs/example-data.json})
./clear-ds.sh
docker-compose -f ../docker/docker-compose.dev.yml exec datastore-writer \
bash -c "source export-database-variables.sh; echo '$DATA' > /data.json; export DATASTORE_INITIAL_DATA_FILE=/data.json; python cli/create_initial_data.py"