Iterate local development with Docker

This makes a few changes to:

- Make local development consistent with our other apps. It's now
faster to start Celery locally since we don't try to build the
image each time - this is usually quick, but unnecessary.

- Add support for connecting to a local Redis instance. Note that
the previous suggestion of "REDIS = True" was incorrect as this
would be turned into the literal string "True".

I've also co-located and extended the recipes in the Makefile to
make them a bit more visible.
This commit is contained in:
Ben Thorner
2022-02-24 17:11:46 +00:00
parent 114128f123
commit c9a9640a4b
4 changed files with 31 additions and 7 deletions

View File

@@ -14,6 +14,8 @@ docker run -it --rm \
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
-e SQLALCHEMY_DATABASE_URI=$SQLALCHEMY_DATABASE_URI \
-e REDIS_ENABLED=${REDIS_ENABLED:-0} \
-e REDIS_URL=${REDIS_URL:-''} \
-v $(pwd):/home/vcap/app \
${DOCKER_IMAGE_NAME} \
${@}