Metro-Records / la-metro-councilmatic

:metro: An instance of councilmatic for LA Metro
MIT License
6 stars 2 forks source link

Update after_install.sh to remove Docker network for previous deployment #989

Closed hancush closed 1 year ago

hancush commented 1 year ago

Docker networks can build up and prevent the creation of additional containers. Let's update our deploy script, which stops and removes the previous Solr container, to also remove the associated Docker network.

https://github.com/Metro-Records/la-metro-councilmatic/blob/8848bfb42e26881a8c525aca393d14e828aea49e/scripts/app_start.sh#L66-L73

antidipyramid commented 1 year ago

@hancush It looks like the change isn't working.

Screen Shot 2023-07-05 at 3 57 57 PM

I think what's going on is that the we're trying to remove the network named for the current deployment before the network has been created.

What about running docker network prune --force to remove the unused networks from the previous deployment(s)?

hancush commented 1 year ago

@antidipyramid My thoughts exactly:

https://github.com/Metro-Records/la-metro-councilmatic/commit/5eaa4d11650d5a0780c9cdf75e2b6aaf709e2433#diff-bdee41882d216002080badfff2d6a1305bb902f2431714a9a6d75442953433c0R72

hancush commented 1 year ago

Done and deployed.