2017-07-31 12:41:47 +00:00
|
|
|
#!/bin/bash -x
|
|
|
|
|
|
|
|
CONTAINER_NAME=${1:-symposion_app}
|
|
|
|
|
|
|
|
docker image build -f docker/Dockerfile -t ${CONTAINER_NAME} .
|
|
|
|
docker container stop symposion
|
|
|
|
docker container rm symposion
|
|
|
|
docker container create --env-file docker/laptop-mode-env -p 28000:8000 --name symposion ${CONTAINER_NAME}
|
|
|
|
docker container start symposion
|
|
|
|
docker exec symposion ./manage.py migrate
|
|
|
|
docker exec symposion ./manage.py loaddata ./fixtures/*.json
|
2017-09-13 07:11:56 +00:00
|
|
|
docker exec symposion ./manage.py populate_inventory
|
2017-07-31 12:41:47 +00:00
|
|
|
docker exec symposion ./manage.py create_review_permissions
|
2017-09-22 09:29:43 +00:00
|
|
|
docker exec symposion ./manage.py loaddata ./fixtures/miniconf-fixtures/*.json
|
2017-09-17 03:54:27 +00:00
|
|
|
if [ -e ./symposion-fixtures ]; then
|
|
|
|
pushd ./symposion-fixtures
|
2017-09-24 02:30:35 +00:00
|
|
|
./load_chunks_local.sh
|
2017-09-17 03:54:27 +00:00
|
|
|
popd
|
|
|
|
else
|
|
|
|
docker exec -it symposion ./manage.py createsuperuser --username root --email root@example.com
|
|
|
|
fi
|
2017-07-31 12:41:47 +00:00
|
|
|
|
2017-08-01 05:23:50 +00:00
|
|
|
set +x
|
|
|
|
echo "Now you can log into http://localhost:28000/admin"
|
|
|
|
echo "Username: root Password: the one you just typed twice"
|
|
|
|
echo "If you need to test as a non-admin user, create one at"
|
|
|
|
echo "http://localhost:28000/admin/auth/user/add/ - then log out"
|
|
|
|
echo "and log back in at http://localhost:28000"
|
2017-09-13 07:11:56 +00:00
|
|
|
|