version: "3.9" services: pleroma_db: image: postgres:15 healthcheck: test: ['CMD', 'pg_isready', '-U', 'postgres'] volumes: - ./data/pleroma/postgres14:/var/lib/postgresql/data environment: - 'POSTGRES_HOST_AUTH_METHOD=trust' - 'POSTGRES_USER=pleroma' - 'POSTGRES_PASSWORD=very_secure_pleroma_password' - 'POSTGRES_DB=pleroma' #pleroma: # image: git.pleroma.social:5050/pleroma/pleroma:release-2-4-1 pleroma_web: image: pleroma_selfbuilt networks: default: aliases: - pleroma.pubtester.local healthcheck: test: [ "CMD-SHELL", "wget -q --spider --proxy=off localhost:4000 || exit 1", ] restart: always ports: - '127.0.0.1:20700:4000' build: context: . # Feel free to remove or override this section # See 'Build-time variables' in README.md args: - "UID=1000" - "GID=1000" - "PLEROMA_VER=v2.4.2" volumes: - ./data/pleroma/uploads:/var/lib/pleroma/uploads - ./data/pleroma/static:/var/lib/pleroma/static - ./files/pleroma.exs:/etc/pleroma/config.exs:ro environment: DOMAIN: pleroma.pubtester.local INSTANCE_NAME: Pleroma/pubtester ADMIN_EMAIL: admin@example.com NOTIFY_EMAIL: notify@example.com DB_HOST: pleroma_db DB_USER: pleroma DB_PASS: very_secure_pleroma_password DB_NAME: pleroma depends_on: - pleroma_db # mastodon config mastodon_db: image: postgres:15 shm_size: 256mb healthcheck: test: ['CMD', 'pg_isready', '-U', 'postgres'] volumes: - ./data/mastodon/postgres14:/var/lib/postgresql/data environment: - 'POSTGRES_HOST_AUTH_METHOD=trust' - 'POSTGRES_USER=mastodon' - 'POSTGRES_PASSWORD=very_secure_mastodon_password' - 'POSTGRES_DB=mastodon' mastodon_redis: restart: always image: redis:7-alpine healthcheck: test: ['CMD', 'redis-cli', 'ping'] volumes: - ./data/mastodon/redis:/data mastodon_web: image: tootsuite/mastodon:v4.0.2 restart: always env_file: .env.mastodon command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" networks: default: aliases: - mastodon.pubtester.local healthcheck: # prettier-ignore test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1'] ports: - '127.0.0.1:20690:3000' depends_on: - mastodon_db - mastodon_redis volumes: - ./data/mastodon/public/system:/mastodon/public/system mastodon_streaming: image: tootsuite/mastodon:v4.0.2 restart: always env_file: .env.mastodon command: node ./streaming healthcheck: # prettier-ignore test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1'] ports: - '127.0.0.1:20691:4000' depends_on: - mastodon_db - mastodon_redis mastodon_sidekiq: image: tootsuite/mastodon restart: always env_file: .env.mastodon command: bundle exec sidekiq depends_on: - mastodon_db - mastodon_redis volumes: - ./data/mastodon/public/system:/mastodon/public/system healthcheck: test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"] # nginx reverse proxy configured for all instances nginx: image: nginx:1.23.1-alpine volumes: - ./files/nginx.conf:/etc/nginx/nginx.conf:ro ports: - '127.0.0.1:20000:80' depends_on: - mastodon_web - mastodon_streaming - pleroma_web