2015-11-01 20:33:08 -06:00
|
|
|
#!/bin/bash
|
2018-03-05 16:30:08 -06:00
|
|
|
SCRIPTPATH=$(cd "$(dirname "$0")" >/dev/null; pwd -P)
|
2016-09-20 17:35:50 -05:00
|
|
|
SOURCE_DIR=$(cd "$SCRIPTPATH" && cd ../.. && pwd -P)
|
2017-05-18 10:36:12 -05:00
|
|
|
DATA_DIR=$SOURCE_DIR/data/postgres
|
2015-11-01 20:33:08 -06:00
|
|
|
|
2016-09-20 17:35:50 -05:00
|
|
|
# Should this also run /etc/runit/1.d/ensure_database, or will that
|
2018-03-05 16:30:08 -06:00
|
|
|
# happen automatically? -- It will happen, but restarting the container is required
|
2019-09-04 01:19:48 -05:00
|
|
|
docker run -it -v $DATA_DIR:/shared/postgres_data discourse/discourse_dev:release /bin/bash -c "rm -fr /shared/postgres_data/*"
|
2018-03-05 16:30:08 -06:00
|
|
|
docker restart discourse_dev
|
|
|
|
echo "Creating admin user..."
|
|
|
|
"${SCRIPTPATH}/rake" admin:create
|