aboutsummaryrefslogtreecommitdiff
path: root/docker-scripts/setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker-scripts/setup.sh')
-rwxr-xr-xdocker-scripts/setup.sh28
1 files changed, 28 insertions, 0 deletions
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'