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