version: "3.8" services: web: image: tootsuite/mastodon command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" ports: - "3000:3000" volumes: - ./data/mastodon:/mastodon/public/system healthcheck: test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"] depends_on: - db - redis env_file: .env.production restart: unless-stopped streaming: image: tootsuite/mastodon command: node ./streaming ports: - "4000:4000" healthcheck: test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1"] depends_on: - db - redis env_file: .env.production restart: unless-stopped sidekiq: image: tootsuite/mastodon command: bundle exec sidekiq volumes: - ./data/mastodon:/mastodon/public/system depends_on: - db - redis env_file: .env.production restart: unless-stopped db: image: postgres:alpine volumes: - ./data/postgres:/var/lib/postgresql/data restart: unless-stopped redis: image: redis:alpine volumes: - ./data/redis:/data restart: unless-stopped