mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
Reduced down time during upgrades
This commit is contained in:
parent
b8754e9542
commit
0b853adb42
@ -1,5 +1,6 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Reduced down time during upgrades
|
||||
- Fix a bug: script mount-webpack.sh was not updating the docker-compose.yml file
|
||||
- Fix a security issue: updated resolve-url-loader to 3.1.2 to fix [CVE-2020-15256](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15256)
|
||||
- Fix a security issue: updated selfsigned to 1.10.8 to fix [CVE-2020-7720](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7720)
|
||||
|
@ -96,6 +96,16 @@ add_environments()
|
||||
done
|
||||
}
|
||||
|
||||
compile_assets_and_migrate()
|
||||
{
|
||||
IMAGE=$(yq r docker-compose.yml 'services.*(.==sleede/fab-manager*)')
|
||||
docker run --rm --env-file ./config/env -v "${PWD}/public/new_packs:/usr/src/app/public/packs" "$IMAGE" bundle exec rake assets:precompile
|
||||
docker-compose down
|
||||
docker-compose run --rm "$SERVICE" bundle exec rake db:migrate
|
||||
rm -rf public/packs
|
||||
mv public/new_packs public/packs
|
||||
}
|
||||
|
||||
upgrade()
|
||||
{
|
||||
[[ "$YES_ALL" = "true" ]] && confirm="y" || read -rp "Proceed with the upgrade? (Y/n) " confirm </dev/tty
|
||||
@ -113,10 +123,7 @@ upgrade()
|
||||
\curl -sSL "https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/$SCRIPT.sh" | bash
|
||||
fi
|
||||
done
|
||||
docker-compose down
|
||||
docker-compose run --rm "$SERVICE" bundle exec rake db:migrate
|
||||
rm -rf public/assets
|
||||
docker-compose run --rm "$SERVICE" bundle exec rake assets:precompile
|
||||
compile_assets_and_migrate
|
||||
for COMMAND in "${COMMANDS[@]}"; do
|
||||
docker-compose run --rm "$SERVICE" bundle exec "$COMMAND"
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user