ウェブサイトの S3 バケットを変更し、すべてのアセットを新しいバケットにコピーしました。すべて同じ状態に保ち、少なくともすべてのファイルが公開読み取り可能であることを確認しました。
for i in $(cat files.txt | awk '{print $4}'); do aws --profile gb_root s3api put-object-acl --bucket gb-www-forum --key $i --acl public-read ; done;
一部の URL や参照されている画像は、まだ古いバケット名に基づいています。
例えば、ロゴの URL は以下のように設定されています:
これは古いバケットであり、すべて新しいバケット名を参照すべきでした。
試したこと:
リベイク
cd /var/discourse
./launcher enter app
rake posts:rebake
これは正常に実行されましたが、何も変更されませんでした。
リマップ(実行失敗)
リマップについて言及されていましたが、どのように機能させるか分かりません。
root@forum-app:/var/www/discourse# rake --tasks | grep remap
rake posts:remap[find,replace,type,ignore_case] # Remap all posts matching specific string
root@forum-app:/var/www/discourse# rake posts:remap["geek-beacon-www-forum", "gb-www-forum", "string", false]
rake aborted!
Don't know how to build task 'posts:remap[geek-beacon-www-forum,' (See the list of available tasks with `rake --tasks`)
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)