version: "3.9" services: pleroma_db: image: postgres:15 healthcheck: test: ['CMD', 'pg_isready', '-U', 'postgres'] volumes: - ./data/pleroma/postgres15:/var/lib/postgresql/data environment: - 'POSTGRES_HOST_AUTH_METHOD=trust' - 'POSTGRES_USER=pleroma' - 'POSTGRES_PASSWORD=very_secure_pleroma_password' - 'POSTGRES_DB=pleroma' pleroma_web: image: pleroma_selfbuilt 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.example.net 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 pleroma2_db: image: postgres:15 healthcheck: test: ['CMD', 'pg_isready', '-U', 'postgres'] volumes: - ./data/pleroma2/postgres15:/var/lib/postgresql/data environment: - 'POSTGRES_HOST_AUTH_METHOD=trust' - 'POSTGRES_USER=pleroma' - 'POSTGRES_PASSWORD=very_secure_pleroma_password' - 'POSTGRES_DB=pleroma' pleroma2_web: # use pleroma_source_selfbuilt if patching pleroma image: pleroma_selfbuilt healthcheck: test: [ "CMD-SHELL", "wget -q --spider --proxy=off localhost:4000 || exit 1", ] restart: always ports: - '127.0.0.1:20710:4000' build: context: . args: - "UID=1000" - "GID=1000" - "PLEROMA_VER=v2.4.2" volumes: - ./data/pleroma2/uploads:/var/lib/pleroma/uploads - ./data/pleroma2/static:/var/lib/pleroma/static - ./files/pleroma.exs:/pleroma/config/prod.secret.exs:ro # dev patches #- /home/luna/git/pleroma/lib/pleroma/formatter.ex:/pleroma/lib/pleroma/formatter.ex:ro #- /home/luna/git/pleroma/deps/linkify/lib/linkify/parser.ex:/pleroma/deps/linkify/lib/linkify/parser.ex:ro environment: DOMAIN: pleroma2.pubtester.example.net INSTANCE_NAME: Pleroma/pubtester2 ADMIN_EMAIL: admin@example.com NOTIFY_EMAIL: notify@example.com DB_HOST: pleroma2_db DB_USER: pleroma DB_PASS: very_secure_pleroma_password DB_NAME: pleroma depends_on: - pleroma2_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: mastodon_selfbuilt restart: always env_file: .env.mastodon command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000 -b 0.0.0.0" 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: mastodon_selfbuilt 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: mastodon_selfbuilt 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"] gotosocial: image: pubtester_gotosocial user: root:root environment: GTS_HOST: gts.pubtester.example.net GTS_DB_TYPE: sqlite GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db GTS_LETSENCRYPT_ENABLED: "false" GTS_LETSENCRYPT_EMAIL_ADDRESS: "" #GTS_TRUSTED_PROXIES: "172.x.x.x" ports: - '127.0.0.1:20720:8080' volumes: - ./data/gotosocial/storage:/gotosocial/storage:rw restart: "always" # nginx reverse proxy configured for all instances nginx: image: nginx:1.23.1-alpine networks: default: aliases: - pleroma.pubtester.example.net - pleroma2.pubtester.example.net - gts.pubtester.example.net volumes: - ./files/nginx.conf:/etc/nginx/nginx.conf:ro - ./pubtester.example.net/cert.pem:/etc/nginx/cert.pem:ro - ./pubtester.example.net/key.pem:/etc/nginx/key.pem:ro ports: - '127.0.0.1:20000:443' depends_on: #- mastodon_web #- mastodon_streaming - pleroma_web - pleroma2_web - gotosocial