1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

fix new postgres image name

This commit is contained in:
Sylvain 2019-10-08 15:56:02 +02:00
parent 974612505d
commit d2db75137a

View File

@ -100,7 +100,7 @@ upgrade_compose()
docker-compose stop postgres
docker-compose rm -f postgres
local image="postgres:$NEW"
sed -i.bak "s/image: postgres:$OLD/image: $NEW/g" "$FM_PATH/docker-compose.yml"
sed -i.bak "s/image: postgres:$OLD/image: postgres:$NEW/g" "$FM_PATH/docker-compose.yml"
# insert configuration directory into docker-compose bindings
awk "BEGIN { FS=\"\n\"; RS=\"\"; } { print gensub(/(image: postgres:$NEW(\n|.)+volumes:(\n|.)+(-.*postgresql\/data))/, \"\\\\1\n - ${NEW_PATH}:/var/lib/postgresql/data\", \"g\") }" "$FM_PATH/docker-compose.yml" > "$FM_PATH/.awktmpfile" && mv "$FM_PATH/.awktmpfile" "$FM_PATH/docker-compose.yml"