我用数字海洋预配置液滴创建了一个Mastodon实例,它在Ubuntu20.04上部署了Mastodon的5.3.5版本。我运行了安装向导,然后立即使用官方指示将其升级为Mastodon的C1。
重新启动后,web就会关闭。日志/var/log/syslog包含:
ActionView::Template::Error (Webpacker can't find media/icons/favicon-16x16.png in /home/mastodon/live/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:然后是清单JSON的长列表。
下面有几件事情没有解决这个问题:
echo RAILS_SERVE_STATIC_FILES=true >> /home/mastodon/live/.env.production
RAILS_ENV=production bundle exec rails assets:precompile使用find,我找到了日志说找不到的文件。在./app/javascript/icons/favicon-16x16.png
所以文件似乎放错地方了?或者这是权限问题?
发布于 2022-12-26 22:38:09
为了回答我自己的问题,我使用的DigitalOcean液滴似乎没有足够的内存来执行升级。我有2GB的内存,但4GB是需要的。
这些说明(我在这里复制从GitHub上的masukomi)是为我工作的:
su - mastodon
cd ~/live
# probably unnecessary but won't hurt...
git checkout yarn.lock
# clobber the precompiled assets because it probably thinks everything's fine with them
RAILS_ENV=production bundle exec rails assets:clobber
RAILS_ENV=production bundle exec rails assets:precompile
# switch back to the root user
exit
# restart all the mastodon services
systemctl restart mastodon-sidekiq
systemctl reload mastodon-web
# probably unnecessary but won't hurt...
systemctl restart mastodon-streaming最后,masukomi指出,您可以将液滴切换回以前使用的较小的RAM大小。感谢Jannik S.为我指出了这个答案。
https://serverfault.com/questions/1115576
复制相似问题