A lightly modified copy of Mastodon, the canonical repository for Chinwag Social's live code. https://social.chinwag.org/
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.
 
 
 
 

116 lines
2.7 KiB

  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:6.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.8.10
  25. # environment:
  26. # - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  27. # - "cluster.name=es-mastodon"
  28. # - "discovery.type=single-node"
  29. # - "bootstrap.memory_lock=true"
  30. # networks:
  31. # - internal_network
  32. # healthcheck:
  33. # test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
  34. # volumes:
  35. # - ./elasticsearch:/usr/share/elasticsearch/data
  36. # ulimits:
  37. # memlock:
  38. # soft: -1
  39. # hard: -1
  40. web:
  41. build: .
  42. image: tootsuite/mastodon
  43. restart: always
  44. env_file: .env.production
  45. command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
  46. networks:
  47. - external_network
  48. - internal_network
  49. healthcheck:
  50. test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
  51. ports:
  52. - "127.0.0.1:3000:3000"
  53. depends_on:
  54. - db
  55. - redis
  56. # - es
  57. volumes:
  58. - ./public/system:/mastodon/public/system
  59. streaming:
  60. build: .
  61. image: tootsuite/mastodon
  62. restart: always
  63. env_file: .env.production
  64. command: node ./streaming
  65. networks:
  66. - external_network
  67. - internal_network
  68. healthcheck:
  69. test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1"]
  70. ports:
  71. - "127.0.0.1:4000:4000"
  72. depends_on:
  73. - db
  74. - redis
  75. sidekiq:
  76. build: .
  77. image: tootsuite/mastodon
  78. restart: always
  79. env_file: .env.production
  80. command: bundle exec sidekiq
  81. depends_on:
  82. - db
  83. - redis
  84. networks:
  85. - external_network
  86. - internal_network
  87. volumes:
  88. - ./public/system:/mastodon/public/system
  89. ## Uncomment to enable federation with tor instances along with adding the following ENV variables
  90. ## http_proxy=http://privoxy:8118
  91. ## ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
  92. # tor:
  93. # image: sirboops/tor
  94. # networks:
  95. # - external_network
  96. # - internal_network
  97. #
  98. # privoxy:
  99. # image: sirboops/privoxy
  100. # volumes:
  101. # - ./priv-config:/opt/config
  102. # networks:
  103. # - external_network
  104. # - internal_network
  105. networks:
  106. external_network:
  107. internal_network:
  108. internal: true