闭社主体 forked from https://github.com/tootsuite/mastodon
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.

108 lines
2.5 KiB

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