웹사이트의 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은 다음과 같이 설정되어 있습니다:
이것은 모든 참조가 새 버킷 이름으로 변경되어야 하는 이전 버킷이었습니다.
시도해 본 사항:
Rebake
cd /var/discourse
./launcher enter app
rake posts:rebake
성공적으로 작동했지만 아무것도 변경되지 않았습니다.
Remap (실행 실패)
Remap에 대해 언급이 있었지만 어떻게 작동하게 해야 할지 모르겠습니다.
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)