Installing a Mastodon

TechDocker, English, Mastodon, Web

Login page of Mastodon
Login page of Mastodon

To learn things about web and prepare local space to my friends, I have installed a Mastodon to my server.
I refer following instructions.

Condition of my server:

  • OS:Ubuntu16.04
  • Front:Apache2
  • Mastodon ver:2.3.3
  • Cert:Let’s Encrypt

Problems:

“docker-compose build” failed

“docker-compose build” failed with following messages.


ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.6/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.84815163.tar.gz: No such file or directory
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.6/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.24d64ab1.tar.gz: No such file or directory

Related issue: https://github.com/gliderlabs/docker-alpine/issues/279
It seems that the alpine server is not stable??

Workaround: Skip to build web, streaming and sidekiq
I don’t intend to build all, so I can skip to build web, streaming and sidekiq according to the following guide.
https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Docker-Guide.md

“docker-compose run –rm web rake assets:precompile” failed

“docker-compose run –rm web rake assets:precompile” failed with following messages.


rake aborted!
Errno::EACCES: Permission denied @ dir_s_mkdir - /mastodon/public/assets/doorkeeper

Workaround: change ownership
change ownership of public directory.
chown -R 991:991 public

Failed in iptable configuration

I have faced an error during investigating problems “iptables : No chain/target/match by that name”

Workaround: reconfigure network

https://qiita.com/miwato/items/9770a2a757d3f5e369a4


$ mv /var/lib/docker/network/files /tmp/docker-iptables-err
$ systemctl restart docker

Errors during “docker-compose run –rm web rake mastodon:setup”

Workaround: do basic tasks manually
I don’t use “docker-compose run –rm web rake mastodon:setup” since I got some errors. So I edited “docker-compose.yml” and did following commands.


$ docker-compose run --rm web rails db:migrate
$ docker-compose run --rm web rails assets:precompile