Major refactoring of build_deploy action, along with docker building and packaging improvements. Added no_signups and other .env improvements. There is no longer a separate .env.dev, both use .env now.
This commit is contained in:
parent
76b2becc24
commit
6f57699c8d
28 changed files with 795 additions and 328 deletions
|
|
@ -1,18 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
# Load environment variables from .env file if it exists in /code/
|
||||
if [ -f /.env ]; then
|
||||
echo "Loading environment variables from .env"
|
||||
# Set allexport option to export all variables defined by sourcing the .env file.
|
||||
set -a
|
||||
source /.env
|
||||
# Unset allexport option.
|
||||
set +a
|
||||
else
|
||||
echo "Warning: Volume mount for /.env file not found. Make sure you are using env_file in docker-compose.yml or mounting it in the container."
|
||||
fi
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo "Startup command not set. Exiting"
|
||||
exit;
|
||||
|
|
@ -25,8 +13,8 @@ else
|
|||
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
|
||||
fi
|
||||
|
||||
echo "Running deploy.sh..."
|
||||
echo "Running deploy.sh... (if you get a APP_REGISTRY_NOT_READY error, there's probably an error in settings.py)"
|
||||
/deploy.sh
|
||||
|
||||
echo "Enviroment is correct and deploy.sh has been run - executing command: '$@'"
|
||||
echo "Environment is correct and deploy.sh has been run - executing command: '$@'"
|
||||
exec "$@" && exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue