Skip to content

Commit

Permalink
fix: better removal of mongodb files (#7393)
Browse files Browse the repository at this point in the history
on staging mongodb refresh
  • Loading branch information
alexgarel committed Sep 26, 2022
1 parent fe266f2 commit ffc94f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ import_prod_data:
@echo "🥫 Copying the dump to MongoDB container …"
docker cp openfoodfacts-mongodbdump.tar.gz $(shell docker-compose ps -q mongodb):/data/db
@echo "🥫 Restoring the MongoDB dump …"
${DOCKER_COMPOSE} exec -T mongodb //bin/sh -c "cd /data/db && tar -xzvf openfoodfacts-mongodbdump.tar.gz && mongorestore --batchSize=1 && rm openfoodfacts-mongodbdump.tar.gz"
${DOCKER_COMPOSE} exec -T mongodb //bin/sh -c "cd /data/db && tar -xzvf openfoodfacts-mongodbdump.tar.gz && rm openfoodfacts-mongodbdump.tar.gz && mongorestore --batchSize=1 && rm -rf /data/db/dump/off"
rm openfoodfacts-mongodbdump.tar.gz

#--------#
Expand Down

0 comments on commit ffc94f2

Please sign in to comment.