Minor tweaks in response to PR comments

This commit is contained in:
Ben Thorner
2022-02-25 17:49:07 +00:00
parent c9a9640a4b
commit 038d47e702
2 changed files with 4 additions and 5 deletions

View File

@@ -61,14 +61,12 @@ export PATH=${PATH}:/Applications/Postgres.app/Contents/Versions/11/bin/
### Redis
To switch redis on you'll need to install it locally. On a OSX we've used brew for this. To use redis caching you need to switch it on by changing the config for development:
To switch redis on you'll need to install it locally e.g. `brew install redis`. To use redis caching you need to switch it on with an environment variable:
```
REDIS_ENABLED = 1
export REDIS_ENABLED=1
```
Note that if you're running Celery with Docker locally, then you'll also need to set `REDIS_URL=redis://host.docker.internal:6379`.
## To run the application
```

View File

@@ -9,13 +9,14 @@ source environment.sh
AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-"$(aws configure get aws_access_key_id)"}
AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-"$(aws configure get aws_secret_access_key)"}
: "${SQLALCHEMY_DATABASE_URI:=postgresql://postgres@host.docker.internal/notification_api}"
REDIS_URL="redis://host.docker.internal:6379"
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:-''} \
-e REDIS_URL=$REDIS_URL \
-v $(pwd):/home/vcap/app \
${DOCKER_IMAGE_NAME} \
${@}