version: '3.8' networks: back: mast-int: volumes: mastodon_public: mastodon_redis: mastodon_lockfile: mastodon_db: services: ### MASTODON mastodon-redis: restart: always image: redis:7.0-alpine healthcheck: test: ['CMD', 'redis-cli', 'ping'] env_file: ../mastodon/env.production volumes: - mastodon_redis:/data networks: - mast-int restart: always mastodon-web: restart: always image: tootsuite/mastodon:v4.3.0 #healthcheck: #test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1'] entrypoint: - bash - -c - "cd /opt/mastodon && /usr/bin/tini -- bundle exec rails server" env_file: ../mastodon/env.production ports: - "127.0.0.1:3000:3000" environment: LOCAL_DOMAIN: "mastodon.${DWEB_DOMAIN}" SMTP_FROM_ADDRESS: "notifications${DWEB_DOMAIN}" command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" depends_on: - mastodon-db - mastodon-redis - mastodon-streaming volumes: - type: volume source: mastodon_public target: /mastodon/public/system volume: subpath: system networks: - mast-int - back restart: always mastodon-streaming: restart: always image: tootsuite/mastodon-streaming:v4.3.2 healthcheck: test: wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1 ] env_file: ../mastodon/env.production ports: - "127.0.0.1:4000:4000" environment: LOCAL_DOMAIN: "mastodon.${DWEB_DOMAIN}" SMTP_FROM_ADDRESS: "notifications@${DWEB_DOMAIN}" command: node ./streaming depends_on: - mastodon-db - mastodon-redis networks: - mast-int - back restart: always mastodon-sidekiq: restart: always image: tootsuite/mastodon:v4.3.2 entrypoint: - sh - -c - "service sendmail start && /usr/bin/tini -- bundle exec sidekiq" healthcheck: test: ps aux | grep '[s]idekiq\ 6' || false env_file: ../mastodon/env.production environment: LOCAL_DOMAIN: "mastodon.${DWEB_DOMAIN}" SMTP_FROM_ADDRESS: "notifications@${DWEB_DOMAIN}" command: bundle exec sidekiq depends_on: - mastodon-db - mastodon-redis volumes: - type: volume source: mastodon_public target: /mastodon/public/system volume: subpath: system networks: - mast-int restart: always mastodon-db: restart: always image: postgres:14.13-alpine healthcheck: test: ['CMD', 'pg_isready', '-U', 'postgres'] environment: - 'POSTGRES_HOST_AUTH_METHOD=trust' volumes: - mastodon_db:/var/lib/postgresql/data networks: - mast-int restart: always