36 lines
1.4 KiB
Bash
Executable file
36 lines
1.4 KiB
Bash
Executable file
#!/bin/bash -x
|
|
|
|
CONTAINER_NAME=${1:-symposion_app}
|
|
|
|
if [ -e ./symposion-tools ]; then
|
|
pushd ./symposion-tools
|
|
./save_db_from_docker.sh
|
|
popd
|
|
fi
|
|
|
|
docker image build -f docker/Dockerfile -t ${CONTAINER_NAME} --target symposion_dev .
|
|
docker container stop symposion
|
|
docker container rm symposion
|
|
docker container create --env-file docker/laptop-mode-env -p 28000:8000 -v $(pwd):/app/symposion_app --name symposion ${CONTAINER_NAME}
|
|
docker container start symposion
|
|
docker exec symposion ./manage.py migrate
|
|
docker exec symposion ./manage.py loaddata ./fixtures/{conference,sites,sitetree,proposal_base}.json
|
|
docker exec symposion ./manage.py create_review_permissions
|
|
#docker exec symposion ./manage.py populate_inventory
|
|
#docker exec symposion ./manage.py loaddata ./fixtures/miniconf-fixtures/*.json
|
|
if [ -e ./symposion-tools ]; then
|
|
pushd ./symposion-tools
|
|
./fixture_to_docker.sh fixtures/dev_dummy_superuser.json
|
|
./fixture_to_docker.sh fixtures/????_*.json
|
|
popd
|
|
else
|
|
docker exec -it symposion ./manage.py createsuperuser --username root --email root@example.com
|
|
fi
|
|
|
|
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"
|
|
|