Skip to content

Commit

Permalink
scripts: fix cleanup-db deleting redis cache
Browse files Browse the repository at this point in the history
  • Loading branch information
flomonster committed Jul 17, 2024
1 parent 5676323 commit a3464b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/cleanup-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ echo "Initialize new database (no migration)..."
docker exec osrd-postgres sh -c 'cat /docker-entrypoint-initdb.d/init.sql | tail -n 1 > /tmp/init.sql'
docker exec osrd-postgres psql -f //tmp/init.sql > /dev/null

# Clear Redis Cache
echo "Deleting redis cache..."
docker exec osrd-redis redis-cli DEL * &> /dev/null || docker volume rm -f osrd_redis_data > /dev/null

echo "Cleanup done!\n"
echo "You may want to apply migrations if you don't load a backup:"
echo "'diesel migration run --migration-dir $(dirname $0)/../editoast/migrations' # 'docker compose up editoast' does it automatically"

0 comments on commit a3464b9

Please sign in to comment.