Merge remote-tracking branch 'upstream/main' into storage-s3

This commit is contained in:
Joachim
2021-08-01 11:38:32 +02:00
26 changed files with 697 additions and 493 deletions

42
bw-dev
View File

@ -50,7 +50,9 @@ function awscommand {
}
CMD=$1
shift
if [ -n "$CMD" ]; then
shift
fi
# show commands as they're executed
set -x
@ -67,9 +69,12 @@ case "$CMD" in
;;
resetdb)
clean
docker-compose up --build -d
# Start just the DB so no one else is using it
docker-compose up --build -d db
execdb dropdb -U ${POSTGRES_USER} ${POSTGRES_DB}
execdb createdb -U ${POSTGRES_USER} ${POSTGRES_DB}
# Now start up web so we can run the migrations
docker-compose up --build -d web
initdb
clean
;;
@ -134,27 +139,38 @@ case "$CMD" in
--endpoint-url ${AWS_S3_ENDPOINT_URL}\
--cors-configuration file:///bw/$@"
;;
runweb)
runweb "$@"
;;
rundb)
rundb "$@"
;;
*)
set +x
set +x # No need to echo echo
echo "Unrecognised command. Try:"
echo " build"
echo " clean"
echo " up"
echo " up [container]"
echo " run"
echo " initdb"
echo " resetdb"
echo " makemigrations"
echo " migrate"
echo " makemigrations [migration]"
echo " migrate [migration]"
echo " bash"
echo " shell"
echo " dbshell"
echo " restart_celery"
echo " test"
echo " pytest"
echo " test_report"
echo " test [path]"
echo " pytest [path]"
echo " collectstatic"
echo " makemessages [locale]"
echo " compilemessages [locale]"
echo " build"
echo " clean"
echo " black"
echo " populate_streams"
echo " generate_preview_images"
echo " generate_preview_images [--all]"
echo " copy_media_to_s3"
echo " set_cors_to_s3"
echo " set_cors_to_s3 [cors file]"
echo " runweb [command]"
echo " rundb [command]"
;;
esac