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.

101 lines
2.3 KiB

8 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/system:/mastodon/public/system
  46. streaming:
  47. build: .
  48. image: tootsuite/mastodon
  49. restart: always
  50. env_file: .env.production
  51. command: yarn start
  52. networks:
  53. - external_network
  54. - internal_network
  55. ports:
  56. - "127.0.0.1:4000:4000"
  57. depends_on:
  58. - db
  59. - redis
  60. sidekiq:
  61. build: .
  62. image: tootsuite/mastodon
  63. restart: always
  64. env_file: .env.production
  65. command: bundle exec sidekiq -q default -q mailers -q pull -q push
  66. depends_on:
  67. - db
  68. - redis
  69. networks:
  70. - external_network
  71. - internal_network
  72. volumes:
  73. - ./public/system:/mastodon/public/system
  74. ## Uncomment to enable federation with tor instances along with adding the following ENV variables
  75. ## http_proxy=http://privoxy:8118
  76. ## ALLOW_ACCESS_TO_HIDDEN_SERVICE=true
  77. # tor:
  78. # build: https://github.com/usbsnowcrash/docker-tor.git
  79. # networks:
  80. # - external_network
  81. # - internal_network
  82. #
  83. # privoxy:
  84. # build: https://github.com/usbsnowcrash/docker-privoxy.git
  85. # command: /opt/sbin/privoxy --no-daemon --user privoxy.privoxy /opt/config
  86. # volumes:
  87. # - ./priv-config:/opt/config
  88. # networks:
  89. # - external_network
  90. # - internal_network
  91. networks:
  92. external_network:
  93. internal_network:
  94. internal: true