Fixing up the migration script some more.

pull/813/head
Dessalines 2020-06-22 12:43:09 -04:00
parent 4332828dd7
commit b161cad982
2 changed files with 36 additions and 24 deletions

View File

@ -1,3 +1,33 @@
# Lemmy v0.7.0 Release (2020-06-2X)
## Breaking Change to our image server: Pictshare to Pict-rs migration guide
This release replaces [pictshare](https://github.com/HaschekSolutions/pictshare) with [pict-rs](https://git.asonix.dog/asonix/pict-rs), and a script must be run on your server to upgrade.
To update, run:
```
cd /lemmy
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/migrate-pictshare-to-pictrs.bash
sudo bash migrate-pictshare-to-pictrs.bash
```
Apart from that, we've closed [~90 issues!](https://github.com/LemmyNet/lemmy/milestone/16?closed=1), including:
- Site-wide list of recent comments.
- Reconnecting websockets.
- Lots more themes, including a default light one.
- Expandable embeds for post links (and thumbnails), from iframely.
- Better icons.
- Emoji autocomplete to post and message bodies, and an Emoji Picker.
- Post body now searchable.
- Community title and description is now searchable.
- Simplified cross-posts.
- Better documentation.
- LOTS more languages.
- Lots of bugs squashed.
# Lemmy v0.6.0 Release (2020-01-16) # Lemmy v0.6.0 Release (2020-01-16)
`v0.6.0` is here, and we've closed [41 issues!](https://github.com/LemmyNet/lemmy/milestone/15?closed=1) `v0.6.0` is here, and we've closed [41 issues!](https://github.com/LemmyNet/lemmy/milestone/15?closed=1)

View File

@ -23,41 +23,23 @@ if [[ -z $(docker-compose ps | grep pictrs) ]]; then
exit exit
fi fi
if [[ -z $(type -P convert) ]]; then
echo "Installing imagemagick to convert .webp images to .jpg"
apt install imagemagick -y
else
echo "Imagemagick already installed."
fi
# echo "Stopping Lemmy so that users dont upload new images during the migration" # echo "Stopping Lemmy so that users dont upload new images during the migration"
# docker-compose stop lemmy # docker-compose stop lemmy
echo "Importing pictshare images to pict-rs"
pushd volumes/pictshare/ pushd volumes/pictshare/
echo "Importing pictshare images to pict-rs..."
IMAGE_NAMES=* IMAGE_NAMES=*
for image in $IMAGE_NAMES; do for image in $IMAGE_NAMES; do
IMAGE_PATH="$(pwd)/$image/$image" IMAGE_PATH="$(pwd)/$image/$image"
if [[ ! -f $IMAGE_PATH ]]; then if [[ ! -f $IMAGE_PATH ]]; then
continue continue
fi fi
if [ ${IMAGE_PATH: -5} == ".webp" ]; then
NEW_IMAGE_PATH=$(echo "$IMAGE_PATH" | sed "s/\.webp$/\.jpg/g")
convert "$IMAGE_PATH" "$NEW_IMAGE_PATH"
IMAGE_PATH="$NEW_IMAGE_PATH"
continue
fi
echo -e "\nImporting $IMAGE_PATH" echo -e "\nImporting $IMAGE_PATH"
ret=0 ret=0
curl --fail -F "images[]=@$IMAGE_PATH" http://127.0.0.1:8537/import || ret=$? curl --silent --fail -F "images[]=@$IMAGE_PATH" http://127.0.0.1:8537/import || ret=$?
# if [[ $ret != 0 ]]; then if [[ $ret != 0 ]]; then
# read -p "Failed to import $IMAGE_PATH, continue? " yn echo "Error for $IMAGE_PATH : $ret"
# case $yn in fi
# [Yy]* ) ;;
# [Nn]* ) exit;;
# * ) exit;;
# esac
# fi
done done
echo "Fixing permissions on pictshare folder" echo "Fixing permissions on pictshare folder"
@ -74,5 +56,5 @@ echo "Moving pictshare data folder to pictshare_backup"
mv volumes/pictshare volumes/pictshare_backup mv volumes/pictshare volumes/pictshare_backup
echo "Migration done, starting Lemmy again" echo "Migration done, starting Lemmy again"
echo "If everything went well, you can delete ./volumes/pictshare_backup/ and uninstall imagemagick" echo "If everything went well, you can delete ./volumes/pictshare_backup/"
docker-compose start lemmy docker-compose start lemmy