From 067f8f92b568527e94e2a04fa495f86f1820a4bc Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Thu, 14 Oct 2021 17:01:23 -0400 Subject: 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. --- docker-scripts/setup.sh | 23 ----------------------- docker-scripts/shell.sh | 12 ------------ docker-scripts/uwsgi.sh | 17 ----------------- 3 files changed, 52 deletions(-) delete mode 100755 docker-scripts/setup.sh delete mode 100755 docker-scripts/shell.sh delete mode 100644 docker-scripts/uwsgi.sh (limited to 'docker-scripts') 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" -- cgit v1.2.3