discourse/bin/docker/reset_db

9 lines
345 B
Plaintext
Raw Normal View History

2015-11-02 10:33:08 +08:00
#!/bin/bash
SCRIPTPATH=$(cd "$(dirname "$0")"; pwd -P)
SOURCE_DIR=$(cd "$SCRIPTPATH" && cd ../.. && pwd -P)
2015-11-02 10:33:08 +08:00
DATA_DIR=$SOURCE_DIR/tmp/postgres
# Should this also run /etc/runit/1.d/ensure_database, or will that
# happen automatically?
docker run -it -v $DATA_DIR:/shared/postgres_data discourse/dev /bin/bash -c "rm -fr /shared/postgres_data/*"