From c49d9e0d69685d022fa6ffaa04f91bbe46f67551 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 27 Mar 2019 23:06:36 -0400 Subject: Fully dockerized environment --- docker-scripts/setup.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 docker-scripts/setup.sh (limited to 'docker-scripts/setup.sh') diff --git a/docker-scripts/setup.sh b/docker-scripts/setup.sh new file mode 100755 index 0000000..e036aa8 --- /dev/null +++ b/docker-scripts/setup.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# Dumps you to a shell inside of the app container + +docker run --rm -it \ + --network dispatch-tracker_backend \ + -v $(pwd)/static:/static \ + -v $(pwd)/app:/app \ + dispatch-app \ + sh -x -e -c ' + cd /app; + export CUSTOM_CONFIG=config-compose.yml + echo "create database dispatch;" | psql -U postgres -h postgres + python3 ./manage.py collectstatic + python3 ./manage.py migrate + python3 ./manage.py createsuperuser + + v="" + while ! [ "$v" = "done" ] ; do + printf "Please login to the system and fill out the form," + printf "then come back, type \"done\" to continue:\t" + read v; + done + + python3 ./manage.py insert_fake_data --companies 10 --users 10 \ + --loads 400 --start-date='"'"'-16w'"'"' --end-date='"'"'+16w'"'"' \ + --attachments=true \ + --invoices=true' -- cgit v1.2.3