Mastodon with Dockerインストール(2018/6)
なんかエラーいっぱい出るのでまとめ
参考にしたページ
Docker+Docker-Composeインストール
して
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get -y install docker-ce sudo usermod -aG docker ${USER} sudo service docker start sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose sudo chown ubuntu:ubuntu /usr/local/bin/docker-compose
Mastodonダウンロード
cd mkdir mstdn cd mstdn git clone https://github.com/tootsuite/mastodon.git cd mastodon git checkout -b v2.4.2rc3
いい感じの作業
いい感じに
cp .env.production.sample .env.production emacs .env.production docker-compose build
つまったとこ1
docker-compose build docker-compose run --rm web rake secret >Starting mastodon_redis_1 ... done >Starting mastodon_db_1 ... done >rake aborted! >Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 12.3.1. Prepending `bundle exec` to your command may solve this. >/mastodon/config/boot.rb:3:in `<top (required)>' >/mastodon/config/application.rb:1:in `require_relative' >/mastodon/config/application.rb:1:in `<top (required)>' >/mastodon/Rakefile:4:in `<top (required)>' >(See full trace by running task with --trace) docker-compose run --rm web bundle exec rake secret >Starting mastodon_redis_1 ... done >Starting mastodon_db_1 ... done >2db5b...
いい感じに
emacs docker-compose.yml
つまったとこ2
docker-compose run --rm web rails db:migrate >Starting mastodon_redis_1 ... done >Starting mastodon_db_1 ... done >[FATAL tini (5)] exec rails failed: No such file or directory docker-compose run --rm web ./bin/rails db:migrate
つまったとこ3
docker-compose run --rm web ./bin/rails assets:precompile >Starting mastodon_db_1 ... done >Starting mastodon_redis_1 ... done >rails aborted! >Errno::EACCES: Permission denied @ rb_sysopen - /mastodon/public/assets/.sprockets-manifest-da082c35f6ba14???5fe????d3dddff64c.json.469923422420880.5.571411 docker-compose run --rm -u root web sh -c "rails assets:precompile && chown -R mastodon:mastodon public"
とりあえずここまで