Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ services:

redis:
image: redis:7-alpine
# In memory. The image declares a volume at /data, so without a mount there each new
# container got a new anonymous volume, which `docker compose down` left behind. Redis holds
# only the broker's queue and the app's short-lived keys, which it can lose.
tmpfs:
- /data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
Expand Down
4 changes: 3 additions & 1 deletion scripts/local_sanitize_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ DB_URL="postgres://postgres:postgres@localhost:${PORT}/${DB_NAME}"
cleanup() {
if [[ $CONTAINER_STARTED -eq 1 ]]; then
echo "Stopping container ${CONTAINER}..."
docker rm -f "$CONTAINER" >/dev/null 2>&1 || true
# -v: --rm deletes the data volume only when the container stops on its own, and removing
# it here would otherwise leave a copy of the restored database behind.
docker rm -f -v "$CONTAINER" >/dev/null 2>&1 || true
fi
}
trap cleanup EXIT
Expand Down
3 changes: 2 additions & 1 deletion scripts/test_download_s3_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ LARGE_DUMP_BYTES=$((9 * 1024 * 1024))
run="qb-s3-dump-test-$$"
work="$(mktemp -d)"
cleanup() {
docker rm -f "$run-s3" "$run-pg18" "$run-pg17" >/dev/null 2>&1 || true
# -v: with their anonymous volumes, such as each Postgres's data directory.
docker rm -f -v "$run-s3" "$run-pg18" "$run-pg17" >/dev/null 2>&1 || true
rm -rf "$work"
}
trap cleanup EXIT
Expand Down
Loading