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