You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
2.8 KiB

8 years ago
  1. version: '3'
  2. services:
  3. db:
  4. restart: always
  5. image: postgres:14-alpine
  6. shm_size: 256mb
  7. networks:
  8. - internal_network
  9. healthcheck:
  10. test: ["CMD", "pg_isready", "-U", "postgres"]
  11. volumes:
  12. - ./postgres14:/var/lib/postgresql/data
  13. environment:
  14. - "POSTGRES_HOST_AUTH_METHOD=trust"
  15. redis:
  16. restart: always
  17. image: redis:6-alpine
  18. networks:
  19. - internal_network
  20. healthcheck:
  21. test: ["CMD", "redis-cli", "ping"]
  22. volumes:
  23. - ./redis:/data
  24. # es:
  25. # restart: always
  26. # image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
  27. # environment:
  28. # - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  29. # - "cluster.name=es-mastodon"
  30. # - "discovery.type=single-node"
  31. # - "bootstrap.memory_lock=true"
  32. # networks:
  33. # - internal_network
  34. # healthcheck:
  35. # test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
  36. # volumes:
  37. # - ./elasticsearch:/usr/share/elasticsearch/data
  38. # ulimits:
  39. # memlock:
  40. # soft: -1
  41. # hard: -1
  42. web:
  43. build: .
  44. image: tootsuite/mastodon
  45. restart: always
  46. env_file: .env.production
  47. command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
  48. networks:
  49. - external_network
  50. - internal_network
  51. healthcheck:
  52. test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
  53. ports:
  54. - "127.0.0.1:3000:3000"
  55. depends_on:
  56. - db
  57. - redis
  58. # - es
  59. volumes:
  60. - ./public/system:/mastodon/public/system
  61. streaming:
  62. build: .
  63. image: tootsuite/mastodon
  64. restart: always
  65. env_file: .env.production
  66. command: node ./streaming
  67. networks:
  68. - external_network
  69. - internal_network
  70. healthcheck:
  71. test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1"]
  72. ports:
  73. - "127.0.0.1:4000:4000"
  74. depends_on:
  75. - db
  76. - redis
  77. sidekiq:
  78. build: .
  79. image: tootsuite/mastodon
  80. restart: always
  81. env_file: .env.production
  82. command: bundle exec sidekiq
  83. depends_on:
  84. - db
  85. - redis
  86. networks:
  87. - external_network
  88. - internal_network
  89. volumes:
  90. - ./public/system:/mastodon/public/system
  91. healthcheck:
  92. test: ["CMD-SHELL", "ps aux | grep '[s]idekiq\ 6' || false"]
  93. ## Uncomment to enable federation with tor instances along with adding the following ENV variables
  94. ## http_proxy=http://privoxy:8118
  95. ## ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
  96. # tor:
  97. # image: sirboops/tor
  98. # networks:
  99. # - external_network
  100. # - internal_network
  101. #
  102. # privoxy:
  103. # image: sirboops/privoxy
  104. # volumes:
  105. # - ./priv-config:/opt/config
  106. # networks:
  107. # - external_network
  108. # - internal_network
  109. networks:
  110. external_network:
  111. internal_network:
  112. internal: true