aboutsummaryrefslogtreecommitdiff
path: root/docker-scripts
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-10-14 17:01:23 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-10-14 17:01:23 -0400
commit067f8f92b568527e94e2a04fa495f86f1820a4bc (patch)
treee641dd94a99ab433f9a2a245c85d9b16a7aa0fed /docker-scripts
parent5369537388a3239f3f19080053fcdab6ad9b95eb (diff)
downloaddispatch-tracker-067f8f92b568527e94e2a04fa495f86f1820a4bc.tar.gz
dispatch-tracker-067f8f92b568527e94e2a04fa495f86f1820a4bc.tar.xz
Move to environment vars. Create a container that sets up a demo.
Instead of the old method with scripts, docker-compose file, everything is pulled into the main container with various configuration options allowed from environment variables. Also move settings.py away from the old yaml setup and pull directly from the environment instead.
Diffstat (limited to 'docker-scripts')
-rwxr-xr-xdocker-scripts/setup.sh23
-rwxr-xr-xdocker-scripts/shell.sh12
-rw-r--r--docker-scripts/uwsgi.sh17
3 files changed, 0 insertions, 52 deletions
diff --git a/docker-scripts/setup.sh b/docker-scripts/setup.sh
deleted file mode 100755
index 6e4ff18..0000000
--- a/docker-scripts/setup.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/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 --no-input
- python3 ./manage.py migrate
- # python3 ./manage.py createsuperuser
- python3 ./manage.py setup
- python3 ./manage.py setup_identity
-
- python3 ./manage.py insert_fake_data --companies 10 --users 10 \
- --loads 400 --start-date='"'"'-16w'"'"' --end-date='"'"'+16w'"'"' \
- --attachments=true \
- --invoices=true'
diff --git a/docker-scripts/shell.sh b/docker-scripts/shell.sh
deleted file mode 100755
index c9ae91f..0000000
--- a/docker-scripts/shell.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# Dumps you to a shell inside of the app container
-
-docker run --rm -it \
- --network dispatch-tracker_backend \
- -e CUSTOM_CONFIG=config-compose.yml \
- -v $(pwd)/static:/static \
- -v $(pwd)/app:/app \
- --user 0 \
- dispatch-app \
- ash
diff --git a/docker-scripts/uwsgi.sh b/docker-scripts/uwsgi.sh
deleted file mode 100644
index 26c57fe..0000000
--- a/docker-scripts/uwsgi.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-set -e
-set -x
-cd /app
-
-uwsgi \
- --socket 0.0.0.0:9200 \
- --env CUSTOM_CONFIG=/app/config.yml \
- --processes 1 \
- --threads 4 \
- --uid uwsgi \
- wsgi:application
-
-ls -la
-
-
-echo "MOTHERFUCKER"