Horrific.Dev's fork of the Mastodon project, hosted @ is.a.horrific.dev. https://joinmastodon.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.
 
 
 
 

132 lines
3.1 KiB

  1. version: '3'
  2. services:
  3. db:
  4. restart: always
  5. image: postgres:9.6-alpine
  6. env_file: .env.secret
  7. environment:
  8. - POSTGRES_DB=postgres
  9. shm_size: 256mb
  10. networks:
  11. - internal_network
  12. healthcheck:
  13. test: ["CMD", "pg_isready", "-U", "postgres"]
  14. volumes:
  15. - ./postgres:/var/lib/postgresql/data
  16. redis:
  17. restart: always
  18. image: redis:5.0-alpine
  19. networks:
  20. - internal_network
  21. healthcheck:
  22. test: ["CMD", "redis-cli", "ping"]
  23. volumes:
  24. - ./redis:/data
  25. # es:
  26. # restart: always
  27. # image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.1.3
  28. # environment:
  29. # - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  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. web:
  37. build:
  38. context: .
  39. args:
  40. - UID=1003
  41. - GID=1003
  42. image: tootsuite/mastodon
  43. restart: always
  44. env_file:
  45. - .env.production
  46. - .env.secret
  47. environment:
  48. - VIRTUAL_PORT=3000
  49. - VIRTUAL_HOST=is.a.horrific.dev
  50. - LETSENCRYPT_HOST=is.a.horrific.dev
  51. - LETSENCRYPT_EMAIL=mail@horrific.dev
  52. command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
  53. networks:
  54. - external_network
  55. - internal_network
  56. healthcheck:
  57. test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:3000/health || exit 1"]
  58. ports:
  59. - "127.0.0.1:1028:3000"
  60. depends_on:
  61. - db
  62. - redis
  63. # - es
  64. volumes:
  65. - ./public/system:/mastodon/public/system
  66. streaming:
  67. build: .
  68. image: tootsuite/mastodon
  69. restart: always
  70. env_file:
  71. - .env.production
  72. - .env.secret
  73. environment:
  74. - VIRTUAL_PORT=4000
  75. - VIRTUAL_HOST=mastodon.horrific.dev
  76. - LETSENCRYPT_HOST=mastodon.horrific.dev
  77. - LETSENCRYPT_EMAIL=mail@horrific.dev
  78. command: node ./streaming
  79. networks:
  80. - external_network
  81. - internal_network
  82. healthcheck:
  83. test: ["CMD-SHELL", "wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1"]
  84. ports:
  85. - "127.0.0.1:1029:4000"
  86. depends_on:
  87. - db
  88. - redis
  89. sidekiq:
  90. build: .
  91. image: tootsuite/mastodon
  92. restart: always
  93. env_file:
  94. - .env.production
  95. - .env.secret
  96. command: bundle exec sidekiq
  97. depends_on:
  98. - db
  99. - redis
  100. networks:
  101. - external_network
  102. - internal_network
  103. volumes:
  104. - ./public/system:/mastodon/public/system
  105. ## Uncomment to enable federation with tor instances along with adding the following ENV variables
  106. ## http_proxy=http://privoxy:8118
  107. ## ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
  108. # tor:
  109. # image: sirboops/tor
  110. # networks:
  111. # - external_network
  112. # - internal_network
  113. #
  114. # privoxy:
  115. # image: sirboops/privoxy
  116. # volumes:
  117. # - ./priv-config:/opt/config
  118. # networks:
  119. # - external_network
  120. # - internal_network
  121. networks:
  122. external_network:
  123. internal_network:
  124. internal: true