barge icon indicating copy to clipboard operation
barge copied to clipboard

Purge flag not working due to missing variable

Open htcarr3 opened this issue 3 years ago • 2 comments

Describe the bug start_ocean.sh script does not properly purge. See line 263 with eval docker-compose --project-name=$PROJECT_NAME "$COMPOSE_FILES" -f "${NODE_COMPOSE_FILE}" down NODE_COMPOSE_FILE is not defined anywhere, which yields null after -f, which breaks that command

To Reproduce Steps to reproduce the behavior: Try to run the script with all options, then stop and rerun with --purge

Expected behavior I would expect this flag to remove all containers running in the project

Screenshots image image

Desktop (please complete the following information):

  • OS: Windows (but using docker dev environment, so this is running inside a linux vm)
  • Browser Edge

htcarr3 avatar Aug 16 '22 20:08 htcarr3

Not sure where NODE_COMPOSE_FILE is, or where it is expected to come from, but assuming it is extraneous, then this change solves the issue: eval docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES down

Happy to submit a pr on this

htcarr3 avatar Aug 16 '22 20:08 htcarr3

also worth noting that lines 265 and 266 seem unnecessary as well, not sure where those would be defined based on anything else in this file 265: docker network rm ${PROJECT_NAME}_default || true 266: docker network rm ${PROJECT_NAME}_backend || true

htcarr3 avatar Aug 16 '22 21:08 htcarr3

Thanks for opening this issue :) It would be great if you can open a PR

LoznianuAnamaria avatar Sep 20 '22 10:09 LoznianuAnamaria

Happy to, I will try to get my local fixes pushed to a fork in the next day or so

htcarr3 avatar Sep 22 '22 18:09 htcarr3

@AnaLoznianu, open pr on this: https://github.com/oceanprotocol/barge/pull/327

htcarr3 avatar Oct 03 '22 21:10 htcarr3