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.

105 lines
2.5 KiB

7 years ago
  1. version: '3'
  2. services:
  3. db:
  4. restart: always
  5. image: postgres:9.6-alpine
  6. networks:
  7. - internal_network
  8. ### Uncomment to enable DB persistance
  9. # volumes:
  10. # - ./postgres:/var/lib/postgresql/data
  11. redis:
  12. restart: always
  13. image: redis:4.0-alpine
  14. networks:
  15. - internal_network
  16. ### Uncomment to enable REDIS persistance
  17. # volumes:
  18. # - ./redis:/data
  19. # es:
  20. # restart: always
  21. # image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.1.3
  22. # environment:
  23. # - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  24. # networks:
  25. # - internal_network
  26. #### Uncomment to enable ES persistance
  27. ## volumes:
  28. ## - ./elasticsearch:/usr/share/elasticsearch/data
  29. web:
  30. build: .
  31. image: tootsuite/mastodon
  32. restart: always
  33. env_file: .env.production
  34. command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000 -b '0.0.0.0'"
  35. networks:
  36. - external_network
  37. - internal_network
  38. ports:
  39. - "127.0.0.1:3000:3000"
  40. depends_on:
  41. - db
  42. - redis
  43. # - es
  44. volumes:
  45. - ./public/assets:/mastodon/public/assets
  46. - ./public/packs:/mastodon/public/packs
  47. - ./public/system:/mastodon/public/system
  48. streaming:
  49. build: .
  50. image: tootsuite/mastodon
  51. restart: always
  52. env_file: .env.production
  53. command: yarn start
  54. networks:
  55. - external_network
  56. - internal_network
  57. ports:
  58. - "127.0.0.1:4000:4000"
  59. depends_on:
  60. - db
  61. - redis
  62. sidekiq:
  63. build: .
  64. image: tootsuite/mastodon
  65. restart: always
  66. env_file: .env.production
  67. command: bundle exec sidekiq -q default -q mailers -q pull -q push
  68. depends_on:
  69. - db
  70. - redis
  71. networks:
  72. - external_network
  73. - internal_network
  74. volumes:
  75. - ./public/packs:/mastodon/public/packs
  76. - ./public/system:/mastodon/public/system
  77. ## Uncomment to enable federation with tor instances along with adding the following ENV variables
  78. ## http_proxy=http://privoxy:8118
  79. ## ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
  80. ## HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY=true
  81. # tor:
  82. # build: https://github.com/usbsnowcrash/docker-tor.git
  83. # networks:
  84. # - external_network
  85. # - internal_network
  86. #
  87. # privoxy:
  88. # build: https://github.com/usbsnowcrash/docker-privoxy.git
  89. # command: /opt/sbin/privoxy --no-daemon --user privoxy.privoxy /opt/config
  90. # volumes:
  91. # - ./priv-config:/opt/config
  92. # networks:
  93. # - external_network
  94. # - internal_network
  95. networks:
  96. external_network:
  97. internal_network:
  98. internal: true